Skip to main content

A python package which converts apidoc comments in various languages to OpenApi Spec .json files.

Project description

Apidoc to Openapi Converter   guide

Apidoc syntax is very easy and lightweight, whereas Openapi aka Swagger syntax is very verbose and not noob friendly. The goal of this project is to make documenting api endpoints so easy that developers won't mind spending the time to do it, instead of just ignoring documentation.

Apidoc conversion coverage

Convertable Annotations:


Feel free to PR in any other annotations you need.


pip install apidoc-to-openapi
usage: apidoc_to_openapi [-h] -i path [-o path] [--yaml]

optional arguments:
  -h, --help  show this help message and exit
  -o path     File output (default: stdout)
  --yaml      Convert output to yaml format

  -i path     File or directory containing apidoc annotations


apidoc-to-openapi -i ./my/path/ -o ./my/path/swagger.yaml --yaml

Running the tests

Used pytest for testing. Test coverage isn't near where I want it to be.

Coding Style

Using black formatter and pylint


  • Graham Thomas - Initial work


This project is licensed under the MIT License - see the file for details


  • I have no friends

Project details

Download files

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

Source Distribution

apidoc_to_openapi-0.0.2.tar.gz (8.6 kB view hashes)

Uploaded source

Built Distribution

apidoc_to_openapi-0.0.2-py3-none-any.whl (15.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page