This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Description
Instead of having
@validate_params(
{
"name": str,
"age": int,
"is_student": bool,
"courses": List[str],
"grades": Dict[str, int],
}
)
def example():
It would make more sense to have the decorator read the function arguments directly like so :
@validate_params
def example(name: str, age: int, is_student: bool, courses: List[str], grades: Dict[str, int]):
/!\ One attention point is to see how Flask interacts with the function and where it places it's variables when doing a function with some kind of slug (@app.route("/users/<user_id>"))