Skip to content

Sphinx extension that automatically documents Swagger APIs

License

Notifications You must be signed in to change notification settings

dfezzie/sphinx-swaggerdoc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sphinxcontrib-swaggerdoc

Sphinx extension for documenting Swagger 2.0 APIs

pip install sphinxcontrib-swaggerdoc

Usage

Include extension in conf.py

extensions = ['sphinxcontrib.swaggerdoc']

Add directive pointing to Swagger api-docs

.. swaggerv2doc:: URL/swagger.json

For example

.. swaggerv2doc:: http://petstore.swagger.io/v2/swagger.json

If the Swagger description contains multiple tags, you can select a subset for the documentation generation. For example, the following directive only generates the documentation for the methods contained in tags pet and store.

.. swaggerv2doc:: http://petstore.swagger.io/v2/swagger.json
   pet
   store

Note

The old directive for Swagger 1.0 is still usable. For example,

.. swaggerdoc:: http://petstore.swagger.wordnik.com/api/api-docs/pet
.. swaggerdoc:: http://petstore.swagger.wordnik.com/api/api-docs/user
.. swaggerdoc:: http://petstore.swagger.wordnik.com/api/api-docs/store

About

Sphinx extension that automatically documents Swagger APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%