A small module to add additional post-processing to the OpenAPI schemas that are generated by Pydantic.
Project description
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, dragonfly-schema and 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pydantic-openapi-helper-0.2.11.tar.gz
.
File metadata
- Download URL: pydantic-openapi-helper-0.2.11.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1dd47304ed3e9ceeff7067f85cc8462d6a6b598839a4b30161b1ed064b20e90 |
|
MD5 | 8be189758f8d6678765003d144b72a7a |
|
BLAKE2b-256 | 315dcaa5b19d00ef8cf6620adb51e61901e7fb4fb077641f2b411f92a9aa68a7 |
File details
Details for the file pydantic_openapi_helper-0.2.11-py2.py3-none-any.whl
.
File metadata
- Download URL: pydantic_openapi_helper-0.2.11-py2.py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28752a7a079987c64800dc35acf09fda9e3b4dbdf487c5b19298b3a63a842904 |
|
MD5 | db370142fca99588f3d4633077bebd20 |
|
BLAKE2b-256 | b91cd5fef2e9be5d3a1469420c672f374dafac1701158f7b79ae151f9fd53303 |