Skip to main content

mkdocs-swagger-ui-html

A MkDocs plugin created to help developer embed API Reference documentation into a mkdocs powered website. API specs data will be rendered with Swagger Editor-like style.

Setup

  1. Install the plugin using pip:

pip install mkdocs-swagger-ui-html

  1. Copy over docs/api-index.md to docs/api-index.md under your project (assuming your mkdocs working path is {root}/docs)

  2. Activate the plugin in mkdocs.yml:

plugins:
  - swagger-ui:
      spec_url: 'https://netstorage.ringcentral.com/dpw/api-reference/specs/rc-platform.yml'

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.

More information about plugins in the MkDocs documentation.

How the plugin works

  • Input: API specs YAML file

  • Render: The plugin takes API specs data and generates api-index.html

  • Injection: api-index.html file will be injected into api-index.md file and rendered along with other md files under the same mkdocs theme when the server is running

plugins:
  - swagger-ui:
      outfile: api/quick-reference.md
pages:
  - 'Home': index.md
  - 'API Reference': api-index.md

Additional Note

  • Warning: mkdocs has hot loading mechanism and this plugin writes files to your local storage, so change and save files when the server is running will cause infinite hot loading issue. Please stop and restart the server before you apply any changes.

TODO

  • Add JSON API specs support

See Also

More information about templates here.

More information about blocks here.

Release files for mkdocs-swagger-ui-html 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-swagger-ui-html 0.1.1
File Size Uploaded
mkdocs-swagger-ui-html-0.1.1.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-swagger-ui-html 0.1.1
File Interpreter ABI Platform
mkdocs_swagger_ui_html-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / mkdocs-swagger-ui-html-0.1.1.tar.gz

Download URL mkdocs-swagger-ui-html-0.1.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e3ff33e277d29e2c5c6f2c1d40ea1fb984f906ad5293f7469c2096f241730dc9
BLAKE2b-256 checksum
How to use checksums
4a525ed32facd98031720598489071676c7bc19c6f9ca41bbdb1f8f1f13c8ea2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Release files / mkdocs_swagger_ui_html-0.1.1-py3-none-any.whl

Download URL mkdocs_swagger_ui_html-0.1.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
845244a3573717728ed6c400e92511b180bdf7f4f9a219e9058aaa7c730a9e36
BLAKE2b-256 checksum
How to use checksums
fd91260dc422f9d048225a6fe55ee1d46195a2220e21535ed1ff48175f5326ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page