We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
number
float
int
Django-ninja sets the type of float data type as number in openapi and clientene renders number as int which causes pydantic validation error.
openapi.json
{ "openapi": "3.1.0", "info": { "title": "NinjaAPI", "version": "1.0.0", "description": "" }, "paths": {}, "components": { "schemas": { "Pet": { "properties": { "age": { "type": "number" } }, "required": [], "title": "Pet", "type": "object" } } } }
Output:
class Pet(pydantic.BaseModel): age: int
Expected:
class Pet(pydantic.BaseModel): age: float
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Django-ninja sets the type of
float
data type asnumber
in openapi and clientene rendersnumber
asint
which causes pydantic validation error.openapi.json
Output:
Expected:
The text was updated successfully, but these errors were encountered: