Closed Ge0rg3 closed 2 months ago
I think this is incorrect usage. Correct usage would be:
@app.route("/update/<int:id>", methods=["POST"])
@ValidateParameters()
def hello(
id: int = Route(),
username_json: Optional[str] = Json(min_str_length=5, alias="username"),
):
print(username_json)
return "Hello World!"
Please let me know if this resolved your issue.
Lmao my bad think I was tired 😁
When a parameter is Optional, the alias attribute breaks:
->