You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BUG][Python-Fastapi] Path parameters when schema type is number causes the url to not be callable as it generates the type as strict float which can't be called by curl/browser
#20315
Open
4 of 6 tasks
louissullivan4 opened this issue
Dec 13, 2024
· 0 comments
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
For Python Fastapi path parameter, when type is number it set it to StrictFloat which isn't good for making calls to the path parameter as when you send a url it gives you an error back as it can't convert the string value to a float. I think it would be more suitable for this value to be a float as it would allow type conversion from a curl or browser call to the server.
Bug Report Checklist
Current Output:
Expected Output
Description
For Python Fastapi path parameter, when type is number it set it to StrictFloat which isn't good for making calls to the path parameter as when you send a url it gives you an error back as it can't convert the string value to a float. I think it would be more suitable for this value to be a float as it would allow type conversion from a curl or browser call to the server.
openapi-generator version
openapi-generator v7.10.0 and master
OpenAPI declaration file content or url
Generation Details
openapi-generator generate -g python-fastapi -i in.json
Steps to reproduce
openapi-generator generate -g python-fastapi -i in.json
Related issues/PRs
#20316
Suggest a fix
Set the number value to generate as float and not strict float
The text was updated successfully, but these errors were encountered: