Describe the bug
I try to generate models from the OpenAPI JSON spec, but only 2 models are being generated (there are much more in the spec).
Generated file:
# generated by datamodel-codegen:
# filename: https://auth.devifex.com/api/swagger.json
# timestamp: 2024-06-16T23:38:53+00:00
from __future__ import annotations
from pydantic import BaseModel, Field, RootModel
class Translation(RootModel[str]):
root: str
class TranslationObject(BaseModel):
field_translation_key_: Translation | None = Field(None, alias='[translationKey]')
To Reproduce
Example schema: https://auth.devifex.com/api/swagger.json
Used commandline:
$ datamodel-codegen --input openapi.json \
--output-model-type pydantic_v2.BaseModel \
--strict-nullable --snake-case-field --capitalize-enum-members \
--use-union-operator --use-standard-collections \
--url https://auth.devifex.com/api/swagger.json
Expected behavior
All models specified in the JSON file must be generated.
Version:
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too