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** When generating models for a schema that contains a field called "date" with ```yaml type: string format: date ``` and the field not being required the resulting...

**Describe the bug** When trying to extract models from openapi, where the main openapi schema itself does not contain traditional `components/schemas` it does not seem to behave correctly. No models...

**Is your feature request related to a problem? Please describe.** We want to create python classes for operation signature as well. For example in this quqry: `mutation setResolutionsForULisa($input: SetResolutionsStepInput!, $someRandomFlag:...

JSON Schema Core has the keywords `if`, `then` and `else for conditional schema validation. Currently datamodel-codegen seems to ignore these fields within a JSON Schema. Ideally when generating a pydantic...

**Describe the bug** When we use the --set-default-enum-member parameter, the value used for defaults is referencing module.EnumName.value, which fails to import when the containing object and the enum are defined...

# Bug Report: datamodel-code-generator Path Handling Error ## Describe the bug The datamodel-code-generator raises an error (AttributeError: 'str' object has no attribute 'get') when the input schema file path is...

**Describe the bug** An import statement is missing in the generated model code: you need to ensure that List, Optional, etc are imported from typing. datamodel-code-generator==0.28.3 ``` self = ,...

**Describe the bug** I get an incompatible types in assignment error for the generated model. > Incompatible types in assignment (expression has type "dict[str, int]", variable has type "Interval |...

**Describe the bug** I think this is due to the changes in this PR: https://github.com/koxudaxi/datamodel-code-generator/pull/2355 We create the Pydantic model from JSON schema and then use that model but the...

bug
help wanted

**Is your feature request related to a problem? Please describe.** I have a schema like this: ```yaml Contact: type: object description: Owner / publisher of this asset library. properties: "name":...