datamodel-code-generator icon indicating copy to clipboard operation
datamodel-code-generator copied to clipboard

Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.

Results 379 datamodel-code-generator issues
Sort by recently updated
recently updated
newest added

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.17 to 9.5.20. Release notes Sourced from mkdocs-material's releases. mkdocs-material-9.5.20 Fixed deprecation warning in privacy plugin (9.5.19 regression) Fixed #7119: Tags plugin emits deprecation warning (9.5.19 regression)...

dependencies

updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.1 → v0.4.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.1...v0.4.4)

**Describe the bug** Generation of list/array of discriminated union annotates the list, not the union. Same problem with `= Field(..., discriminator)` too if you don't use annotated. **To Reproduce** Example...

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.1 to 0.4.2. Release notes Sourced from ruff's releases. v0.4.2 Changes Rule changes [flake8-pyi] Allow for overloaded __exit__ and __aexit__ definitions (PYI036) (#11057) [pyupgrade] Catch usages of...

dependencies

In some projects, I use [pydantic.dataclasses](https://docs.pydantic.dev/latest/concepts/dataclasses/) to add validation to dataclass models. This is useful on project that requires dataclasses but still want to use pydantic for validation. All fields...

enhancement

**Describe the bug** Models in external files referenced by `$ref` are not being output to the Python file. It seems only the items under `index.yml#/components` are being output. It might...

bug

I would like to specify a base class, but not have it enabled on properties that are referenced, i.e. no base class on the properties classes. I'm not sure if...

answered

**Describe the bug** When generating models via `datamodel-codegen` against valid jsonschema created from Pydantic models that rely on postponed annotations and `Annotated[Union[]]`s, the output pydantic models are "out of order"...

bug

**Describe the bug** Does not generate an enumeration for oneOf + cost. For example, autocomplete in Jetbrains IDE works fine for this case. **To Reproduce** 1. create a schema 2....

enhancement

Would it be possible to support .xsd files to data models? It hasn't been trivial converting xsd to json schema in order to import into pydantic, so a native xsd...

enhancement