https://github.com/ladybug-tools/pydantic-openapi-helper
A small module to add additional post-processing to the OpenAPI schemas that are generated by Pydantic.
https://github.com/ladybug-tools/pydantic-openapi-helper
Last synced: 9 months ago
JSON representation
A small module to add additional post-processing to the OpenAPI schemas that are generated by Pydantic.
- Host: GitHub
- URL: https://github.com/ladybug-tools/pydantic-openapi-helper
- Owner: ladybug-tools
- License: mit
- Created: 2020-10-12T21:06:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-17T22:56:18.000Z (almost 3 years ago)
- Last Synced: 2025-09-04T03:50:18.724Z (9 months ago)
- Language: Python
- Homepage: http://www.ladybug.tools/pydantic-openapi-helper/
- Size: 804 KB
- Stars: 4
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://travis-ci.com/ladybug-tools/pydantic-openapi-helper)
[](https://www.python.org/downloads/release/python-370/)
# pydantic-openapi-helper
A small module to add additional post-processing to the OpenAPI schemas that are generated
by Pydantic.
This module is designed to work with Ladybug Tools schema libraries such as
[honeybee-schema](https://github.com/ladybug-tools/honeybee-schema/),
[dragonfly-schema](https://github.com/ladybug-tools/dragonfly-schema/) and
[queenbee](https://github.com/ladybug-tools/queenbee/) but might be also helpful for
other projects.
The most important feature of the library is to generate an OpenAPI schema to use
polymorphism. It adds referenced values to subclasses using allOf field as explained in
this post: https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism
We are not intending to support the development for make this library work universally
but you are more than welcome to fork and make your own version of the library.
## installation
`python3 -m pip install pydantic-openapi-helper`