datamodel-code-generator
datamodel-code-generator copied to clipboard
Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
Bumps [regex](https://github.com/mrabarnett/mrab-regex) from 2022.8.17 to 2022.9.13. Commits 4ad1f04 Updated to Unicode 15.0.0. 416dd66 Updated version. 134e570 Updated main.yml for GitHub Actions. Contributed by animalize. 45642ba Git issue 479: Segmentation fault...
[#749] Numbers ¹ to ⁹ were not supported by '\W' in re.sub schema example ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "test": { "type": "string",...
**Describe the bug** I have run into an issue with a somewhat complex inheritance structure. The order of class definitions of the generated model is incorrect, resulting in NameErrors. However,...
Bumps [freezegun](https://github.com/spulec/freezegun) from 1.2.1 to 1.2.2. Changelog Sourced from freezegun's changelog. 1.2.2 Removes Python 3.6 support, which reached its EOL on 2021-12-23 (https://devguide.python.org/versions/?highlight=End-of-life#unsupported-versions). Improved static typing definitions Don't freeze pytest...
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.11 to 1.26.12. Release notes Sourced from urllib3's releases. 1.26.12 Deprecated the urllib3[secure] extra and the urllib3.contrib.pyopenssl module. Both will be removed in v2.x. See this GitHub...
For a schema with a property that can be null and has a null default value, the pydantic model is not correctly generated. For instance: ```json { "properties": { "name":...
**Describe the bug** If multiple properties use the same $ref, with one of those properties having the same name as the $ref, the generated code fails mypy checks with a...
Hi @koxudaxi, this works as expected to support #837, though I have no idea if this should be handled elsewhere
**Describe the solution you'd like** The ability to use pydantic discriminator when defining the field schema. https://pydantic-docs.helpmanual.io/usage/types/#discriminated-unions-aka-tagged-unions **Describe alternatives you've considered** The alternative is always to ensure that all subtypes...
**Describe the bug** I'm trying to use `datamodel-codegen` to generate Pydantic models from [Stripe's openapi](https://github.com/stripe/openapi). The generation itself succeeds but trying to import the generated package results in an import...