diff --git a/README.md b/README.md index 5129c61d6..7bbb143c9 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,6 @@ and [msgspec.Struct](https://github.com/jcrist/msgspec) from an openapi file and ## Help See [documentation](https://koxudaxi.github.io/datamodel-code-generator) for more details. -## Sponsors -[![JetBrains](https://avatars.githubusercontent.com/u/60931315?s=200&v=4)](https://github.com/JetBrainsOfficial) - ## Quick Installation To install `datamodel-code-generator`: @@ -236,6 +233,45 @@ class Apis(BaseModel): ``` +## Supported input types +- OpenAPI 3 (YAML/JSON, [OpenAPI Data Type](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#data-types)); +- JSON Schema ([JSON Schema Core](http://json-schema.org/draft/2019-09/json-schema-validation.html)/[JSON Schema Validation](http://json-schema.org/draft/2019-09/json-schema-validation.html)); +- JSON/YAML/CSV Data (it will be converted to JSON Schema); +- Python dictionary (it will be converted to JSON Schema); +- GraphQL schema ([GraphQL Schemas and Types](https://graphql.org/learn/schema/)); + +## Supported output types +- [pydantic](https://docs.pydantic.dev/1.10/).BaseModel; +- [pydantic_v2](https://docs.pydantic.dev/2.0/).BaseModel; +- [dataclasses.dataclass](https://docs.python.org/3/library/dataclasses.html); +- [typing.TypedDict](https://docs.python.org/3/library/typing.html#typing.TypedDict); +- [msgspec.Struct](https://github.com/jcrist/msgspec); +- Custom type from your [jinja2](https://jinja.palletsprojects.com/en/3.1.x/) template; + +## Sponsors + + + + + + +
+ + JetBrains Logo +

JetBrains

+
+
+ + Astral Logo +

Astral

+
+
+ + Datadog, Inc. Logo +

Datadog, Inc.

+
+
+ ## Projects that use datamodel-code-generator These OSS projects use datamodel-code-generator to generate many models. @@ -267,21 +303,6 @@ See the following linked projects for real world examples and inspiration. - [SeldonIO/MLServer](https://github.com/SeldonIO/MLServer) - *[generate-types.sh](https://github.com/SeldonIO/MLServer/blob/master/hack/generate-types.sh)* -## Supported input types -- OpenAPI 3 (YAML/JSON, [OpenAPI Data Type](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#data-types)); -- JSON Schema ([JSON Schema Core](http://json-schema.org/draft/2019-09/json-schema-validation.html)/[JSON Schema Validation](http://json-schema.org/draft/2019-09/json-schema-validation.html)); -- JSON/YAML/CSV Data (it will be converted to JSON Schema); -- Python dictionary (it will be converted to JSON Schema); -- GraphQL schema ([GraphQL Schemas and Types](https://graphql.org/learn/schema/)); - -## Supported output types -- [pydantic](https://docs.pydantic.dev/1.10/).BaseModel; -- [pydantic_v2](https://docs.pydantic.dev/2.0/).BaseModel; -- [dataclasses.dataclass](https://docs.python.org/3/library/dataclasses.html); -- [typing.TypedDict](https://docs.python.org/3/library/typing.html#typing.TypedDict); -- [msgspec.Struct](https://github.com/jcrist/msgspec); -- Custom type from your [jinja2](https://jinja.palletsprojects.com/en/3.1.x/) template; - ## Installation To install `datamodel-code-generator`: @@ -319,6 +340,7 @@ This method needs the [http extra option](#http-extra-option) ## All Command Options The `datamodel-codegen` command: + ```bash usage: datamodel-codegen [options] diff --git a/docs/index.md b/docs/index.md index 071a6a9f5..6291035b2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,9 +12,6 @@ This code generator creates [pydantic v1 and v2](https://docs.pydantic.dev/) mod [![Pydantic v1](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v1.json)](https://pydantic.dev) [![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev) -## Sponsors -[![JetBrains](https://avatars.githubusercontent.com/u/60931315?s=200&v=4)](https://github.com/JetBrainsOfficial) - ## Quick Installation To install `datamodel-code-generator`: @@ -232,6 +229,44 @@ class Apis(BaseModel): ``` +## Supported input types +- OpenAPI 3 (YAML/JSON, [OpenAPI Data Type](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#data-types)); +- JSON Schema ([JSON Schema Core](http://json-schema.org/draft/2019-09/json-schema-validation.html)/[JSON Schema Validation](http://json-schema.org/draft/2019-09/json-schema-validation.html)); +- JSON/YAML/CSV Data (it will be converted to JSON Schema); +- Python dictionary (it will be converted to JSON Schema); +- GraphQL schema ([GraphQL Schemas and Types](https://graphql.org/learn/schema/)); + +## Supported output types +- [pydantic](https://docs.pydantic.dev/1.10/).BaseModel; +- [pydantic_v2](https://docs.pydantic.dev/2.0/).BaseModel; +- [dataclasses.dataclass](https://docs.python.org/3/library/dataclasses.html); +- [typing.TypedDict](https://docs.python.org/3/library/typing.html#typing.TypedDict); +- [msgspec.Struct](https://github.com/jcrist/msgspec); +- Custom type from your [jinja2](https://jinja.palletsprojects.com/en/3.1.x) template; + +## Sponsors + + + + + + +
+ + JetBrains Logo +

JetBrains

+
+
+ + Astral Logo +

Astral

+
+
+ + Datadog, Inc. Logo +

Datadog, Inc.

+
+
## Projects that use datamodel-code-generator These OSS projects use datamodel-code-generator to generate many models. @@ -263,21 +298,6 @@ See the following linked projects for real world examples and inspiration. - [SeldonIO/MLServer](https://github.com/SeldonIO/MLServer) - *[generate-types.sh](https://github.com/SeldonIO/MLServer/blob/master/hack/generate-types.sh)* -## Supported input types -- OpenAPI 3 (YAML/JSON, [OpenAPI Data Type](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#data-types)); -- JSON Schema ([JSON Schema Core](http://json-schema.org/draft/2019-09/json-schema-validation.html)/[JSON Schema Validation](http://json-schema.org/draft/2019-09/json-schema-validation.html)); -- JSON/YAML/CSV Data (it will be converted to JSON Schema); -- Python dictionary (it will be converted to JSON Schema); -- GraphQL schema ([GraphQL Schemas and Types](https://graphql.org/learn/schema/)); - -## Supported output types -- [pydantic](https://docs.pydantic.dev/1.10/).BaseModel; -- [pydantic_v2](https://docs.pydantic.dev/2.0/).BaseModel; -- [dataclasses.dataclass](https://docs.python.org/3/library/dataclasses.html); -- [typing.TypedDict](https://docs.python.org/3/library/typing.html#typing.TypedDict); -- [msgspec.Struct](https://github.com/jcrist/msgspec); -- Custom type from your [jinja2](https://jinja.palletsprojects.com/en/3.1.x) template; - ## Installation To install `datamodel-code-generator`: