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

**Describe the bug** Pydantic has an underlying bug when using `multiple_of` with float, and is covered [here](https://github.com/pydantic/pydantic/issues/3074). To my knowledge, `Decimal` is more stable in this regard. **To Reproduce** Here...

bug
help wanted

**Describe the bug** When a local file is referenced and it has more than one dot in the name, it is misinterpreted during `import` syntax generation. It can leads to...

bug
help wanted

**Describe the bug** datamodel-code-generator doesn't merge the properties of the referenced array with the properties given by the additional keywords, which is [allowed](https://json-schema.org/draft/2020-12/json-schema-core#section-8.2.3.1-1) by the jsonschema specification. For more details...

bug
help wanted

**Is your feature request related to a problem? Please describe.** Yes, I want to be able to specify different base classes for my generated models. **Describe the solution you'd like**...

enhancement
help wanted

**Describe the bug** Python's type specification no longer allows for function calls directly in type annotations, [as discussed here](https://github.com/microsoft/pylance-release/issues/5457). However, in an effort to keep the generator compatible with Pydantic...

bug
help wanted

**Describe the bug** Generating `TypedDict` definitions of a schema with `const` and `required` yields `NotRequired[str]`. **To Reproduce** Example schema: ```json { "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "AndType": { "additionalProperties": false, "description":...

bug
help wanted

**Is your feature request related to a problem? Please describe.** I had messed up my custom template formatting, so a required line break was missing, so the class header line...

enhancement
help wanted

**Is your feature request related to a problem? Please describe.** I'm trying to create a client for an API whose json schema includes enums that may be expanded without warning....

enhancement
help wanted

I'm trying to generate Pydantic V2 models from the Kubernetes OpenAPI Batch spec, but I'm running into issues when the default value in the OpenAPI spec is given as `{}`....

bug
help wanted

Please, see the discussion here https://github.com/koxudaxi/datamodel-code-generator/discussions/2132, which has not gained much attention, that's why I'm opening the issue.

enhancement
help wanted