datamodel-code-generator
datamodel-code-generator copied to clipboard
Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
**Is your feature request related to a problem? Please describe.** One of the reasons why I want to use pydantic instead of json-schema (where the source of truth for data...
**Describe the bug** When generating an OpenAPI contract with discriminator in schema, Pydantic V1 and V2 models use an alias instead of the field name for discriminator, which is why...
**Describe the bug** Mypy (and pyright) are not happy about the generated classes See https://github.com/pydantic/pydantic/issues/6713 **To Reproduce** * Generate a model with an Optional field and `--use-annotated` * Use it...
**Describe the bug** Extra, invalid line generated with Pydantic. This line doesn't do anything useful and even after trying several codegen versions and flags variations, I was unable to get...
**Is your feature request related to a problem? Please describe.** Our FastAPI startup time is slow due to initializing Pydantic models. A lot of this initialization time is in models...
**Is your feature request related to a problem? Please describe.** Even with https://github.com/wolverdude/GenSON/issues/73 fixed, datamodel-code-generator still depends on httpx, which is not yet supported in pyodide (see https://github.com/koenvo/pyodide-http/issues/37) **Describe the...
**Describe the bug** Generated classes create code that errors with TypeError: non-default argument 'XYZ' follows default argument. **To Reproduce** ``` Example schema: openapi: 3.0.0 components: schemas: Error: type: object description:...
Bumps [genson](https://github.com/wolverdude/genson) from 1.2.2 to 1.3.0. Changelog Sourced from genson's changelog. 1.3.0 Modernization add support for Python versions up through 3.12 remove support for old Python versions older than 3.7...
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.17 to 9.5.23. Release notes Sourced from mkdocs-material's releases. mkdocs-material-9.5.23 Fixed #7183: Edge case in anchor navigation when using instant navigation Fixed #6436: Version selector not showing...
**Describe the bug** A clear and concise description of what the bug is. I'm trying to generate models from the skyscanner public JSON schema from here: [partnerportal.skyscanner.net](https://partnerportal.skyscanner.net/tr-docs/static/push.schema.flights.v6.json) where they have...