Sphinx extension for documenting Swagger 2.0 APIs
Project description
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 a remote Swagger api-docs
.. swaggerv2doc:: URL/swagger.json
or to a local file
.. swaggerv2doc:: file:///PATH/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
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
Close
Hashes for sphinxcontrib_swaggerdoc-0.1.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ee69c6d53ee216405fa201cbd2ae47dd71aeef2a63ddcae595081c2459c2498 |
|
MD5 | c6b59b9f17830eb1bdd5e4b562ec3891 |
|
BLAKE2b-256 | 30129a2d31c9369ef1b1a14d7f47ce8fcfa4fe62aa1c4e9cf259915dfb7f1a4d |