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

**Is your feature request related to a problem? Please describe.** I have RFC 8259 valid JSON (not `jsonschema` type) file with list of objects. When I try to run `datamodel-codegen...

enhancement

**Is your feature request related to a problem? Please describe.** If a `$ref` definition contains a `default`, this is not being passed to the `property` using the `$ref`. E.g., ```json...

bug

**Describe the bug** When using alias maximum / minimum ... the generated type is Union[int, float, None]. As the class ConstaintsBase does not uses the BaseModel option smart_union, if a...

Just FYI https://pydantic-docs.helpmanual.io/blog/pydantic-v2/ Likely requires dropping < v2

**Is your feature request related to a problem? Please describe.** from [asyncapi docs](https://www.asyncapi.com/docs/getting-started): > AsyncAPI is an open source initiative that seeks to improve the current state of Event-Driven Architectures...

enhancement

**Describe the bug** Generator crashing in case of bool keywords in a specification. Also, schema with the name `None` produces an invalid model code. **To Reproduce** Try to generate models...

bug

**Is your feature request related to a problem? Please describe.** When using the [--use-title-as-name](https://github.com/koxudaxi/datamodel-code-generator/pull/510) flag, inline defined child schemas get a number appended to them because of name conflicts. For...

enhancement
help wanted

**Describe the bug** I need an option to provide users with their own configuration with key names created by them. The model generated contains no `__root__` therefore it does not...

bug

**Is your feature request related to a problem? Please describe.** Currently, the generated enums look like this: ```python class Status(Enum): first_status = "status1" second_status = "status2" ``` **Describe the solution...

enhancement

**Describe the bug** Hello When I start to create code from the json blow, I get a KeyError. The Error description says : `KeyError: '#definitions/ChargingStationType'` although `ChargingStationType` is specified under...