mkdocs-swagger-ui
A MkDocs plugin created to help developer embed API Reference documentation into a mkdocs powered website.
The output file can be modified by editing a template file.
Setup
Install the plugin using pip:
pip install mkdocs-swagger-ui
Activate the plugin in mkdocs.yml:
plugins:
- swagger-ui:
spec_url: 'https://netstorage.ringcentral.com/dpw/api-reference/specs/rc-platform.yml'
outfile: 'docs/api.md'
Add the CSS file to your mkdocs.yml:
extra_css:
- https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.43.0/swagger-ui.css
Options
spec_url: Sets the URL to the Swagger specification for the RingCentral platform. This should default to the official URL. Override this for development purposes only.outfile: The file to output. This file is typically somewhere in your docs folder.template: The name of the template file that generates the contents of the Swagger UI generated page. This file should be located in atmpldirectory.
More information about plugins in the MkDocs documentation.
How the plugin works
This plugin works by loading a different template and markdown file that renders a Swagger UI page in a file's place. The key to making this work is to ensure that the outfile plugin config value matches the filename of some file in your documentation tree, as shown below. When mkdocs encounters this file and if the file matches the outfile then the plugin will render a Swagger UI in place of whatever file may already be in place. In other words, the contents of the file are completed ignored, and replaced by the output of this plugin.
plugins:
- swagger-ui:
outfile: api/quick-reference.md
pages:
- 'Home': index.md
- 'Quick Reference': api/quick-reference.md
See Also
More information about templates here.
More information about blocks here.
Metadata
Release files for mkdocs-swagger-ui 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mkdocs-swagger-ui-0.2.4.tar.gz | 4.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkdocs_swagger_ui-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / mkdocs-swagger-ui-0.2.4.tar.gz
| Download URL | mkdocs-swagger-ui-0.2.4.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c82e1b9d631d7cbe8ad899cca46d75126b43df918df8c998f8abb2edaf6d040c
|
|
BLAKE2b-256 checksum How to use checksums |
3d44a9f0897930f9e0660caa2e4e9c707547858b909b667e42ae77bac23b76a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / mkdocs_swagger_ui-0.2.4-py3-none-any.whl
| Download URL | mkdocs_swagger_ui-0.2.4-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de78497c34984f0192e959466c65e55539184a973483eab88aa682029c01c270
|
|
BLAKE2b-256 checksum How to use checksums |
a93d7d3d65765035718c202aed157f8f456f1665ac65567babcead918d30110f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for mkdocs-swagger-ui 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.