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
trafficstars

Bumps [graphql-core](https://github.com/graphql-python/graphql-core) from 3.2.4 to 3.2.5. Release notes Sourced from graphql-core's releases. v3.2.5 Patch-release GraphQL-core v3.2.5, based on GraphQL.js v16.8.2. This patch-release supports Python 3.6 to 3.13. Thanks to all...

dependencies

adds support for: - adding base class kwargs to the msgpsec template in order to support adding tag and tag_field kwargs for Struct. - the discriminator property, uses the propertyName...

Bumps [distlib](https://github.com/pypa/distlib) from 0.3.8 to 0.3.9. Changelog Sourced from distlib's changelog. 0.3.9 Released: 2024-10-09 scripts Merge #215: preload script wrappers on Windows to assist with a pip issue (thanks, Paul...

dependencies

**Describe the bug** Sometimes "--collapse-root-models" works without "--field-constraints" but fails when using it. I found this when converting [docker compose's spec](https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json) to pydantic v2 model. I've condensed the problematic part...

Bumps [pydantic-core](https://github.com/pydantic/pydantic-core) from 2.23.4 to 2.24.2. Release notes Sourced from pydantic-core's releases. v2.24.2 2024-10-15 What's Changed Add serialization key to InvalidSchema by @​sydney-runkle in pydantic/pydantic-core#1482 Full Changelog: https://github.com/pydantic/pydantic-core/compare/v2.24.1...v2.24.2 v2.24.1 2024-10-11...

dependencies

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.31 to 9.5.41. Release notes Sourced from mkdocs-material's releases. mkdocs-material-9.5.41 Fixed #7619: Improved tooltip on logo disappears after instant navigation Fixed #7616: Race condition in built-in privacy...

dependencies

**Describe the bug** When I use `--use-annotated`, the default value for a RootModel field is a string. I would expect it to be the RootModel("value") **To Reproduce** Example schema: ```json...

**Is your feature request related to a problem? Please describe.** Given a 2.0 OpenAPI document, trying to import it fails as it finds no models Args: ``` --input-file-type openapi --input...

**Describe the bug** Generating `pydantic_v2.BaseModel` from jsonschema with a reference schema in another file alongside a `"additionalProperties": false,` creates an invalid Pydantic object. **To Reproduce** Example schema 1: ```json {...

``` datamodel-codegen --help | grep yaml ``` displays `yaml` as a supported input file type. If this option is selected, we get `Invalid file format` back.