An MkDocs plugin to generate a table of contents page for a swagger specification to make navgating to an API Reference easier.
Project description
mkdocs-ringcentral-api-index
A MkDocs plugin created by RingCentral to assist in the creation of an API Quick Reference based upon a swagger specification. The output of this plugin can be seen here:
https://developers.ringcentral.com/guide/basics/api-index
At RingCentral we had the desire to publish an API Quick Reference that would make it easier for developers to scan for the endpoint they are looking for and quickly access the documentation for that endpoint in our API Reference. To solve this problem, we created a plugin that will take as input an OAS 3.0 API specification, and output a markdown file that can rendered within mkdocs.
The output file can be modified by editing a template file.
This plugin may not work as expected out-of-the-box for any OAS specification, as it makes use of a number of proprietary OAS elements specific to RingCentral, including:
- x-availability
- x-user-permission
- x-app-permission
- x-throttling-group
Setup
Install the plugin using pip:
pip install mkdocs-ringcentral-api-index
Activate the plugin in mkdocs.yml
:
plugins:
- search
- ringcentral-api-index:
spec_url: 'https://netstorage.ringcentral.com/dpw/api-reference/specs/rc-platform.yml'
outfile: 'docs/api-index.md'
Note: If you have no
plugins
entry in your config file yet, you'll likely also want to add thesearch
plugin. MkDocs enables it by default if there is noplugins
entry set, but now you have to enable it explicitly.
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.
More information about plugins in the MkDocs documentation.
How the plugin works
This plugin works by generating a markdown file prior to the rest of a mkdocs project being built. In other words, as soon as mkdocs is started, this plugin downloads a spec file, parses it, generates a markdown file, and saves that file into the documentation tree. Then to make the generated page appear in your documentation, you add the file to your pages
tree. For example:
plugins:
- ringcentral-api-index:
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.
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
Built Distribution
File details
Details for the file mkdocs-ringcentral-api-index-0.1.6.tar.gz
.
File metadata
- Download URL: mkdocs-ringcentral-api-index-0.1.6.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9124ba604493628fc4f8d56f76f6f7d4b608a523b65c4a53e48e4b6dd4cf67e |
|
MD5 | 1eb1c9f2003942638bfa192d5b5cab5a |
|
BLAKE2b-256 | 80e8d1c402b40601b9a428c2e55abacfb2b542263a92251e3c1bd42848027a13 |
File details
Details for the file mkdocs_ringcentral_api_index-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_ringcentral_api_index-0.1.6-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b869c53cd17add8048fe850568728fdd3106af3313ef6dde3e442bcab030e9c8 |
|
MD5 | f8a5a5844be5a612d25584f778cfafb1 |
|
BLAKE2b-256 | ae74e567ab059a77bdca00330db3594e9730c09136c2b69919572a8d28723aea |