koxudaxi/datamodel-code-generator

Generate Python data models from schema definitions (OpenAPI, JSON Schema, GraphQL, and more)

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
inputInput schema file or directoryyes
outputOutput file or directoryyes
input-file-typeInput file type (openapi, asyncapi, jsonschema, mcp-tools, xmlschema, graphql, protobuf, avro, json, yaml, csv)yes
output-model-typeOutput model type (pydantic_v2.BaseModel, pydantic_v2.dataclass, dataclasses.dataclass, typing.TypedDict, msgspec.Struct)yes
checkValidate that existing output is up to date (no generation)notrue
working-directoryWorking directory (where pyproject.toml is located)no.
profileNamed profile from pyproject.toml [tool.datamodel-codegen.profiles.<name>]no""
extra-argsAdditional CLI argumentsno""
versionSpecific version to install (defaults to action tag version if tag looks like a version, otherwise latest)no""
extrasOptional extras to install (comma-separated: graphql, http, validation, ruff, all)no""

no outputs