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 openapi-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.1.tar.gz
(11.6 kB
view hashes)
Built Distribution
Close
Hashes for openapi3_parser-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9b708b9eb54e4d9dc43c75d54d56b226469be4bee903469fea2efc1291e4ab6 |
|
MD5 | a73335f8fa71f5bb521952769caffe42 |
|
BLAKE2b-256 | 78d0f20dc1feb24bf805983fc301fa5c64b4a7b987f76acd20c1753728fdcb27 |