3 ms·
For developers out there who use openapi to auto-generate documentation and client libraries. If you need to do this in python, please consider using the new ht
by spacether 5y ago
For developers out there who use openapi to auto-generate documentation and client libraries. If you need to do this in python, please consider using the new https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/python-experimental.md#metadata https://github.com/OpenAPITools/openapi-generator/blob/maste... generator, which I wrote.
Some reasons to use it:
- it preserves spec case in model properties and endpoints
- it enforces run time type checking
- it has more robust composition (oneOf/anyOf/allOf) than the python generator
- it has type hints
- api loading is quicker (one can load one endpoint vs all of them automatically loading previously)
- one can check if an instance validated against a schema by checking if the instance is an instance of the schema class
- it uses python >= 3.9
- it includes type: string format: number Decimal support so now you can send numbers as strings and preserve precision
- enums are now accessible as class constants
- uniqueItems validations added
- multiple content types supported in endpoint request bodies + responses