Skip to main content

A MkDocs plugin supports for add Swagger UI in page.

Project description

MkDocs Swagger UI Tag

PyPI version PyPI downloads

A MkDocs plugin supports for add Swagger UI in page.

Live demo with mkdocs-material theme.

Features

  1. OpenAPI Specification file from online over URL or static file in docs
  2. Multiple Swagger UI in same page
  3. Synchronized dark mode with mkdocs-material

Dependency

  1. Python Package
    1. beautifulsoup4==4.11.1
  2. Swagger UI dist javascript file and css file
    1. swagger-ui-dist==4.12.0

Usage

  1. Install plugin from pypi

    pip install mkdocs-swagger-ui-tag
    
  2. Add swagger-ui-tag plugin in to your mkdocs.yml plugins sections:

    plugins:
       - swagger-ui-tag
    
  3. You may customize the plugin by passing options in mkdocs.yml:

    plugins:
       - swagger-ui-tag:
            background: White
    
    Option Default Description
    background "" Swagger UI iframe body background attribute value. You can use any css value for background for example "#74b9ff" or Gainsboro or "" for nothing.
  4. Add swagger-ui tag in markdown to include Swagger UI

    <swagger-ui src="https://petstore.swagger.io/v2/swagger.json"/>
    

    Swagger UI Sample Image

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Reference

  1. Amoenus Swagger Dark Theme: source of dark mode css

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

mkdocs-swagger-ui-tag-0.2.0.tar.gz (2.7 MB view details)

Uploaded Source

File details

Details for the file mkdocs-swagger-ui-tag-0.2.0.tar.gz.

File metadata

  • Download URL: mkdocs-swagger-ui-tag-0.2.0.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.10

File hashes

Hashes for mkdocs-swagger-ui-tag-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2182384eea9cee782204c2502efbdb6b0970ee93cd5469db15f3bbedef19e376
MD5 62258ba2c62cd9e4fb90be3cf06fd4ed
BLAKE2b-256 3bd6f6181447d1508ba78afc6693fccd47b026eca21cf4a73b809429155a48c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page