manchenkoff / openapi3-parser

OpenAPI 3 parser to use a specification inside of the code in your projects
https://pypi.org/project/openapi3-parser/
MIT License
59 stars 32 forks source link

[Feature] Use pydantic instead of raw parsing #17

Open manchenkoff opened 3 years ago

manchenkoff commented 3 years ago

What is a problem? A lot of inappropriate code for parsing key-value to data classes, like extract_attrs or extract_typed_props

Describe the solution you'd like Use Pydantic with automatic resolving and type casting methods

Describe alternatives you've considered Nothing

Additional context Nothing

rafalkrupinski commented 5 months ago

aiopenapi3 has quite good OAD model for all 3 versions (swagger 2, OAI 3 & 3.1), written in Pydantic and on MIT license. The model has some project-specific code, but surely cleaning it would be less work than starting from scratch.