Skip to main content

MkDocs plugin from TechDocs Owl, renders AsyncAPI and OpenAPI specs into reference pages

Project description

techdocs-owl-api

MkDocs plugin that renders AsyncAPI and OpenAPI specs into reference pages at build time.

Install

pip install mkdocs-owl-api
# mkdocs.yml
plugins:
  - search
  - owl-api

Add a page with a techdocs-owl-asyncapi: or techdocs-owl-openapi: frontmatter key and an empty body — the plugin fills it in at build time.

---
techdocs-owl-asyncapi: ../specs/asyncapi.yml
---

Supports AsyncAPI 2.x/3.0 and OpenAPI 3.x (YAML or JSON), local paths or HTTP(S) URLs, recursive $ref resolution, and a bundled stylesheet (auto-injected, no extra_css setup needed).

Site-wide defaults

plugins:
  - owl-api:
      schema_depth: 3
      hide_internal: false
      hide_bindings: false
      hide_traits: false
      hide_security: false
      hide_version: false
      hide_download_link: false

Page frontmatter overrides these per-page.

AsyncAPI pages

---
techdocs-owl-asyncapi:
  spec: https://schema.example.com/my-service-asyncapi
  title: My Service Events
  intro: One-paragraph intro shown above the spec body.
  schema_depth: 3
---
Key Type Default Effect
spec string Required. Path or URL to the spec file.
title string info.title Page H1.
intro markdown Shown between the title and metadata block.
hide_version bool false Hide the version line.
hide_internal bool false Drop properties marked x-internal-only: true.
hide_bindings bool false Skip bindings on servers/channels/operations/messages.
hide_traits bool false Skip trait sections and references.
hide_security bool false Skip security admonitions.
hide_download_link bool false Hide the spec download link.
schema_depth int 3 Depth of dot-path flattening for nested object properties.
attachments list Extra files to copy and list in the downloads table.

Renders, in order: info, Servers, Operations (operation-centric across both AsyncAPI versions), Messages, Schemas, Parameters, Traits — sections absent from the spec are skipped.

OpenAPI pages

---
techdocs-owl-openapi: https://petstore3.swagger.io/api/v3/openapi.json
---
Key Type Default Effect
spec string Required. Path or URL to the spec file.
title string info.title Page H1.
intro markdown Shown between the title and metadata block.
hide_version bool false Hide the version line.
hide_internal bool false Drop x-internal-only properties.
hide_download_link bool false Hide the spec download link.
schema_depth int 3 Depth of dot-path flattening for nested object properties.
attachments list Extra files to copy and list in the downloads table.

Renders: info, Servers, endpoints grouped by tag (parameters, request body, responses, security), Schemas.

Downloads & attachments

The resolved spec (external $refs inlined) is written to assets/techdocs-owl-api/<page-slug>.json and linked from a Downloads table. Add extra files (e.g. .proto schemas) with attachments:

---
techdocs-owl-asyncapi:
  spec: ../specs/asyncapi.yml
  attachments:
    - path: ../schemas/customer.proto
      title: Customer Protobuf Schema
    - ../schemas/order.proto   # shorthand: path only, title = filename
---

Error handling

Errors (missing/unreadable spec, network failures, parse errors, bad frontmatter) render as a !!! danger admonition instead of failing the build.

Development

uv sync
uv run pytest

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_owl_api-0.1.0.tar.gz (72.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_owl_api-0.1.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_owl_api-0.1.0.tar.gz.

File metadata

  • Download URL: mkdocs_owl_api-0.1.0.tar.gz
  • Upload date:
  • Size: 72.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mkdocs_owl_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ce20086126daca0db08d28ecf4642d1548f8883bee022dccf572d3d97f6fe5b9
MD5 44ed0b823b234c280a5ba4714e046fbd
BLAKE2b-256 de6d7d6dd07dfcabcaadfc8ebc26f44733340d4098c208e68a31ede49ea2c7a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_owl_api-0.1.0.tar.gz:

Publisher: publish.yml on techdocs-owl/mkdocs-owl-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_owl_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_owl_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mkdocs_owl_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 298f5b12d26cbdf99a2544afa0d6484fb85358ccb8d9ccbb8b7465a1f3eba610
MD5 8828f1d14eca627fc575bdf3dc9e1ef2
BLAKE2b-256 1eb01e7bd63a3b2fedfcbe1e87dc495bfad53bed079c55b306d7fe84e74aef92

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_owl_api-0.1.0-py3-none-any.whl:

Publisher: publish.yml on techdocs-owl/mkdocs-owl-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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