OpenAPI v3 parser
Project description
OpenAPI Parser
A simple package to parse your OpenAPI 3 documents into Python object to work with.
How to install
To install package run the following command
pip install openapi3-parser
How to use
Example of parser usage
>>> from openapi_parser import parse
>>> content = parse('swagger.yml')
>>> print(content)
Supported specification schemas
- Contact
- License
- Info
- Server
- ExternalDoc
- Tag
- Schema
- Integer schema
- Number schema
- String schema
- Array schema
- Object schema
- Property
- Parameter
- Header
- Content
- RequestBody
- Response
- Operation
- PathItem
- Path
- Security
- ApiKeySecurity
- HttpSecurity
- OAuthFlow
- OAuth2Security
- OpenIdConnectSecurity
- Specification
Features
- OpenAPI's validation with
openapi-spec-validator
- Parsing all the sections into Python
dataclass
- Support many
Enum
values to simplify work withformat
,type
, etc - Auto-resolve
$ref
links with Prance - Support custom
x-*
attributes - Support automatic merge
allOf
schemas into one while resolving - Support
oneOf
schemas - Support
anyOf
schemas - Support
not
schemas - Support
Parameter
serialization style - Support
discriminator
model types - Support additional properties in dataclasses (like
example
,style
,explode
, etc)
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
openapi3-parser-0.0.2.tar.gz
(11.6 kB
view details)
Built Distribution
File details
Details for the file openapi3-parser-0.0.2.tar.gz
.
File metadata
- Download URL: openapi3-parser-0.0.2.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84ca7b6827f278a633b478d8aa370062fe2ae0897756297492b1359ec27ddb43 |
|
MD5 | 7f0f960f259d0679abfde1f0ce953ab1 |
|
BLAKE2b-256 | 763954e572e8e2a575f07d57a663014660a33f8a99210e068bddaf763b8c769c |
File details
Details for the file openapi3_parser-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: openapi3_parser-0.0.2-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cacfb268ea4f1177b5113e28e7c806d46e11044117b7bd80d3de3581897ce7db |
|
MD5 | 6fcbbaf9d326fa6b7a411055c2db23e6 |
|
BLAKE2b-256 | 810f678529ad31afd19b8b27c7207f260878090e3af4dae02915f5463d728872 |