koxudaxi / datamodel-code-generator

Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
https://koxudaxi.github.io/datamodel-code-generator/
MIT License
2.6k stars 290 forks source link

Support for XML Schema to Pydantic Models #1869

Open alexiswl opened 6 months ago

alexiswl commented 6 months ago

Would it be possible to support .xsd files to data models?

It hasn't been trivial converting xsd to json schema in order to import into pydantic, so a native xsd parser would be very much appreciated!

koxudaxi commented 4 months ago

Thank you for creating the issue. I needed to find out the details of the .xsd. However, we can implement parsers like JSON schema, OpenAPI, and GraphQL. https://github.com/koxudaxi/datamodel-code-generator/tree/main/datamodel_code_generator/parser