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

Thanks for this wonderful tool! **Describe the bug** From the [json schema specification ](http://json-schema.org/understanding-json-schema/reference/object.html#additional-properties) if I understand well, a JSON object can be used in `additionalProperties` like below: **To Reproduce**...

**Is your feature request related to a problem? Please describe.** Marking a property as required in combination of having a default value is still marked as optional in the Python...

**Describe the bug** When I run the datamodel-code-generator for json-schema the field name converter with enum do an infinite loop. **To Reproduce** Example schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array",...

**Is your feature request related to a problem? Please describe.** I was recently approaching the pulsar's schema registry. As you know, it supports Avro natively. In order to better support...

enhancement

The support is needed for new pydantic version which has new features like discriminated unions etc.

enhancement

**Is your feature request related to a problem? Please describe.** I would like to document request bodies in OpenAPI's dedicated `#/components/requestBodies` section, however, it is not currently picked up by...

answered

**Describe the bug** The parser raises an error if any models contain references to object properties, rather than the top-level objects. **To Reproduce** Example schema: ```yaml openapi: "3.0.3" info: title:...

**Is your feature request related to a problem? Please describe.** I need to generate a model for constrained lists in order to validate and enforce the list elements to be...

enhancement

**Describe the bug** OpenAPI 3 references JSONSchema 2019-09 (since https://github.com/OAI/OpenAPI-Specification/pull/1977), which includes support for the `const` keyword. The `const` keyword is for defining constant value properties in schemas. **To Reproduce**...

enhancement

**Describe the bug** An option --field-constraints add decimal points for integers constraints **To Reproduce** Example schema: ``` { "type": "object", "properties": { "dataSize": { "type": "integer", "minimum": 10, "maximum": 64...