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
default
number
str
Describe the bug Bug in parsing number in scientific notation
To Reproduce
Example schema:
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "test": { "type": "number", "title": "Test", "description": "Testcase", "default": 1e-5 } } }
Used commandline:
$ datamodel-codegen --input test_codegen.json --output model_test_codegen.py --output-model-type pydantic_v2.BaseModel --input-file-type jsonschema
Observed behavior
class Model(BaseModel): test: Optional[float] = Field('1e-5', description='Testcase', title='Test')
Expected behavior
class Model(BaseModel): test: Optional[float] = Field(1e-5, description='Testcase', title='Test')
Version:
Maybe related to #1952 .
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Bug in parsing
number
in scientific notationTo Reproduce
Example schema:
Used commandline:
Observed behavior
Expected behavior
Version:
Maybe related to #1952 .
The text was updated successfully, but these errors were encountered: