Open torazem opened 9 months ago
@torazem Amazingly, I am trying to do precisely the same thing: convert the Jira openapi spec to pydantic models. Did you have any luck with the conversion? If so, did you find a workaround to make this package work or did you find an alternative? Hope you see this. Thanks!
Describe the bug When I try to generate models from an OpenAPI schema containing discriminators, I get an error:
RuntimeError: Discriminator type is not found
.To Reproduce Get the OpenAPI spec for the Jira REST API, or the reduced example below. Try to convert it into Pydantic models using
datamodel-code-generator
.Example schema:
Used commandline:
Result:
Expected behavior The command should generate a file
models.py
containing pydantic models.Version:
Additional context None