Converter from Swagger to Sphinx HTTP domain.
Project description
Swagger is an open specification for documenting REST APIs in JSON or YAML. Imperfect as it is, it’s de facto a standard for many API developers.
This extension lets you render your swagger.json file as a Sphinx document. It uses HTTP domain directives for paths and a glossary for definitions.
Usage
Install the extension:
$ pip install sphinxcontrib-swagger2sphinxCopy the content of swagger-api.rst to the file where you want your Swagger file rendered.
Add the extension to your conf.py:
extensions = [ 'sphinxcontrib.swagger2sphinx', ... ]Specify the path to your Swagger file in conf.py. It can be a local path or a URL:
swagger2sphinx_swagger_location = "swagger.json" # swagger2sphinx_swagger_location = "http://example.com/swagger.json"
Testimonials
Thanks to Eric Holscher for writing an excellent blog post about extending Sphinx with Jinja2 templating.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinxcontrib_swagger2sphinx-0.1.4-py3-none-any.whl.
File metadata
- Download URL: sphinxcontrib_swagger2sphinx-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c3695d569db096a6af390f7e1711085d1764b12cd1579edabb7bdd54337c948
|
|
| MD5 |
029e2ae8ff36639f4872f72e26c011c5
|
|
| BLAKE2b-256 |
4b4186e8b8f0a2b41c68426af483a9388b6b13de1abe584ef7b9d619060258c5
|