Skip to main content

OpenAPI 3.0 specs parser and client/server generator

Project description

OpenAPI 3.0 Parser

This package provides functionality to analyze OpenAPI 3.0 Specification files and build clients and servers from that specification.

For more details, please refer the Project Documentation

Example Usage

import yaml

from openapi_parser.exporter import PackageWriter
from openapi_parser.parser.loader import *

def main():
    with open('data/petstore.yaml') as f:
        schema = yaml.safe_load(f)

    parser = OpenApiParser(schema)
    parser.load_all()

    package_writer = PackageWriter('.code-gen/petstore')
    package_writer.write_package(parser)

    return 0

if (__name__ == '__main__'):
    exit_code = main()
    exit(exit_code)

TODOs:

  • Model generator:
    • Core functionality
    • Class inheritance support
    • Enums support
    • Required properties in combination with readOnly/writeOnly
    • Discriminator property support
    • Cyclic refs resolution
    • Support of additionalProperties inside class
  • Client generator
    • Core functionality
    • Smart body encoding
    • Smart response decoding
    • style-encoding
    • schema and content inside parameters conflict support
    • Enums for parameters support
    • Cookies parameters support
    • Methods descriptions
  • Metadata extractor
    • Version
    • Licence
    • Description
    • Servers
  • Server generator
  • Test coverage
  • Documentation
  • Command-line interface

See Also:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openapi_parser-0.1.6-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file openapi_parser-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: openapi_parser-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9

File hashes

Hashes for openapi_parser-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9503c1f2f99abe45943f464805be12c345c24bfcf9eb28c2d259c86c21e6cb4d
MD5 7bbc79d662b0856b91d1ba74301df2a1
BLAKE2b-256 918fe793b699842d656a47c20d0bb065bb97d7e88a5f2640db0f4db0c72d0ac8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page