input parameter with Form not work well #11919
Answered
by
YuriiMotov
xiaoyaolangzhi
asked this question in
Questions
-
First Check
Commit to Help
Example Code@app.post("/test")
def test(value: str = Form("5e-05")):
print("value: " + value)DescriptionThe 'value' parameter should receive a string value, not a float. Operating SystemLinux Operating System DetailsNo response FastAPI Version0.111.0 Pydantic Version2.5.3 Python Version3.10.12 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
YuriiMotov
May 19, 2025
Replies: 1 comment
-
|
If you try sending such request using Swagger, you will see the curl command it uses: And, in this command the value is already |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YuriiMotov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


If you try sending such request using Swagger, you will see the curl command it uses:
And, in this command the value is already
0.00005. So, this is likely the issue of Swagger UI.Would you like to look for such issue on Swagger UI repo and open if not exist?