datamodel-code-generator
datamodel-code-generator copied to clipboard
datamodel-codegen isn't creating all models from jsonschema
trafficstars
The class Model "Docentes" isn't generated by datamodel-codegen
To Reproduce
Example schema:
Used commandline:
datamodel-codegen --input test.json --input-file-type jsonschema --output model.py
Expected behavior
Convert the "Docentes" jsonschema to python class
Version:
- OS: Ubuntu 20.04
- Python version: 3.8.10
- datamodel-code-generator version: 0.11.15
@VictorCarlquist I'm sorry for my late reply. I just confirmed the problem. I will investigate the problem.
Hi @VictorCarlquist
I just checked your schema.
Your schema has properties and oneOf attributes in the same object.
I think we can't represent the way in the pydantic.
If you want to pass the oneOf value to the pydantic model then we should use Extra.allow in the pydantic config.