v13.0
Standalone Endpoint Web Component

RapiDoc Mini

<rapi-doc-mini> is a lightweight, zero-iframe Web Component designed to embed live, interactive OpenAPI endpoints directly into technical blog posts, markdown tutorials, changelogs, and microservice workflows without visual clutter.

100%No <iframe> Friction
GranularOperation Filtering
Live TRYInteractive Console
Multi-SpecMicroservice Mashup
Why RapiDoc Mini

The Problem with Traditional API Documentation

Blog & Tutorial Writing

Static markdown code snippets and screenshots go stale the moment an API schema changes. <rapi-doc-mini> reads directly from your source OpenAPI spec, guaranteeing your code examples and live consoles are always 100% up to date.

Step-by-Step Onboarding

When guiding a developer through a multistep journey (e.g. Register → Verify → Transact), you don't want to overwhelm them with 100 irrelevant endpoints. Pluck and display only the relevant endpoint at each step.

Microservice Storytelling

Modern architectures divide APIs across dozens of microservices. <rapi-doc-mini> allows you to pluck 1 endpoint from Billing, 1 from Identity, and 1 from Catalog into a unified narrative without merging backend specs.

Release Notes & Changelogs

Announce a new or deprecated endpoint in your product changelog by embedding the live interactive card directly into the release announcement with a working "TRY" console.

Interactive Demo 1

Seamless Blog & Guide Embedding

Just like an <img> tag, <rapi-doc-mini> drops directly into any HTML flow. Notice how it blends seamlessly with the page background, allowing you to trigger live API requests without being trapped inside an iframe or nested card:

blog-embed.html
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>

<rapi-doc-mini
  spec-url="/specs/reqres.yaml"
  color-scheme="dark"
  paths-expanded="false"
> </rapi-doc-mini>
Live Component Output (Blended with Page)
Interactive Demo 2

Placement, Sizing & Custom CSS Styling

Just like an <img> or <div> tag, <rapi-doc-mini> can be styled with standard CSS. You can easily constrain its width, apply custom border and border-radius, adjust padding, or attach box shadows to fit your exact layout requirements:

custom-styling.html
<!-- Custom width, golden border, table schema, and padding -->
<rapi-doc-mini
  style="max-width: 650px; width: 100%; border: 2px solid #eab308; border-radius: 8px; padding: 12px; margin: 16px 0;"
  spec-url="/specs/reqres.yaml"
  color-scheme="dark"
  schema-style="table"
  layout="column"
  paths-expanded="false"
> </rapi-doc-mini>

<!-- Compact single-endpoint card with salmon accent border -->
<rapi-doc-mini
  style="max-width: 650px; width: 100%; border: 1px solid #f87171; border-radius: 6px; padding: 8px; margin: 16px 0;"
  spec-url="/specs/reqres.yaml"
  color-scheme="dark"
  filter-operations="POST /users"
  paths-expanded="false"
> </rapi-doc-mini>
Custom Width (650px), Golden Border & Padding
Single-Endpoint Card with Salmon Accent Border
Interactive Demo 3

Selective Endpoint Filtering with filter-operations

Instead of rendering an entire specification, use filter-operations to display only the exact endpoint needed for your narrative (e.g. filter-operations="POST /users"). A method and path matches that path exactly, not the paths below it:

filter-endpoint.html
<rapi-doc-mini
  spec-url="/specs/reqres.yaml"
  color-scheme="dark"
  paths-expanded="false"
  filter-operations="POST /users"
> </rapi-doc-mini>
Filtered Output: Only POST /users
Interactive Demo 4

Several Operations, Globs, Tags and Exclusions

filter-operations takes several terms, separated by spaces or commas. An operation is shown when it matches any term and no term that starts with !. A term is an operationId, a method and path, a path, a glob (* is one path segment, ** any number), tag:name, badge:label or deprecated. Operations keep the order of the terms they match:

filter-terms.html
<!-- A list of operations, shown in this order -->
<rapi-doc-mini
  spec-url="/specs/reqres.yaml"
  schema-style="table"
  filter-operations="GET /users/{userId} POST /users"
> </rapi-doc-mini>

<!-- A glob: every operation under /pet -->
<rapi-doc-mini spec-url="/specs/petstore.json" filter-operations="/pet/**"> </rapi-doc-mini>

<!-- A tag, without one of its operations -->
<rapi-doc-mini
  spec-url="/specs/petstore.json"
  filter-operations="tag:store !DELETE /store/order/{orderId}"
> </rapi-doc-mini>

<!-- Everything except operations badged Internal, and deprecated ones -->
<rapi-doc-mini spec-url="/specs/api.yaml" filter-operations="!badge:Internal !deprecated"> </rapi-doc-mini>
A list: GET /users/{userId}, then POST /users
A glob: /pet/**
A tag and an exclusion: tag:store !DELETE /store/order/{orderId}
Interactive Demo 5

Always-Expanded Inline Mode (paths-expanded="true")

If click-to-expand accordion controls do not fit your article flow, set paths-expanded="true" to render parameters, request body schemas, and the live test console fully expanded:

expanded-mode.html
<rapi-doc-mini
  spec-url="/specs/reqres.yaml"
  color-scheme="dark"
  schema-style="table"
  layout="column"
  paths-expanded="true"
  filter-operations="POST /users"
> </rapi-doc-mini>
Fully Expanded Inline View
Interactive Demo 6

Multi-Spec Microservice Integration

Seamlessly weave endpoints from multiple independent OpenAPI specs into a cohesive story. Below, we embed an endpoint from a Syntax Highlighting service alongside an endpoint from a Petstore service in the same article:

microservices-flow.html
<!-- Service A: Code Highlighting Service -->
<rapi-doc-mini
  spec-url="/specs/code-highlight.yaml"
  color-scheme="dark"
  filter-operations="GET /code"
  paths-expanded="false"
> </rapi-doc-mini>

<!-- Service B: Store & Inventory Service -->
<rapi-doc-mini
  spec-url="/specs/petstore.json"
  color-scheme="dark"
  filter-operations="/store/**"
  paths-expanded="false"
> </rapi-doc-mini>
Microservice A: Code Highlighting Spec (/specs/code-highlight.yaml)
Microservice B: Petstore Inventory Spec (/specs/petstore.json)
Interactive Demo 7

Handling Unavailable Specs (404 / Network Errors)

If an OpenAPI spec URL is missing, invalid, or returns a 404 HTTP status, <rapi-doc-mini> renders a clean built-in error message without throwing unhandled exceptions or breaking your page layout:

spec-not-found.html
<!-- Graceful error rendering when a spec is unavailable or returns 404 -->
<rapi-doc-mini
  spec-url="/specs/fake-non-existing.json"
  color-scheme="dark"
> </rapi-doc-mini>
Graceful Error State (Non-Existent Spec URL)
API Reference

Supported <rapi-doc-mini> Attributes

Configure any of the following HTML attributes directly on the custom element tag to control filtering, theming, layout, and authorization:

AttributeType / AllowedDefaultDescription
spec-urlString(empty)
URL of the OpenAPI specification file (JSON or YAML) to load and render.
filter-operationsString(empty)
Which operations to show: space- or comma-separated terms. An operationId, "GET /users", a path, a glob ("/store/**"), "tag:store", "badge:Beta" or "deprecated"; "!" before a term leaves it out. Empty shows every operation.
paths-expandedtrue | falsefalse
Controls whether matching endpoints are expanded by default or rendered as collapsible items.
layoutrow | columnrow
Internal layout of endpoint details (side-by-side parameters and console, or stacked in a column).
schema-styletree | tabletree
Visual representation of request and response JSON schemas: interactive tree or structured table.
schema-expand-levelNumber999
Initial expansion depth for nested schema models and properties.
themedark | lightdark
Base color theme preset for the component.
bg-colorHex / CSS color#1a1a1a
Custom background color for the component container, allowing seamless blending with your page.
text-colorHex / CSS color(theme default)
Base text color for endpoint descriptions, labels, and parameters.
primary-colorHex / CSS color#f3705a
Accent highlight color used for primary buttons, active tabs, and HTTP method badges.
allow-trytrue | falsetrue
Enables or disables the interactive "TRY" execution console.
show-curl-before-trytrue | falsefalse
Generates and displays copyable cURL commands directly in the card before execution.
api-key-nameString(empty)
Name of the API key header or query parameter to include in interactive requests.
api-key-locationheader | queryheader
Target location where the API key value will be injected.
api-key-valueString(empty)
Value of the API key or bearer authorization token.
server-urlString(from spec)
Overrides the base API server URL for all requests made from the widget.
regular-fontString(system font)
Custom font family for body text and labels (e.g. "Outfit, sans-serif").
mono-fontString(monospace)
Custom font family for code blocks, payloads, and parameter definitions.
Architecture

Component Comparison: <rapi-doc> vs. <rapi-doc-mini>

Understanding when to use the comprehensive full-portal <rapi-doc> component versus the lightweight, embeddable <rapi-doc-mini> widget:

Feature / Goal<rapi-doc><rapi-doc-mini>
Best forA complete API reference, on its own pageOne or a few endpoints inside a blog post, tutorial or changelog
Navigation sidebar and searchYesNo
URL hash routingYes (update-route)No: never changes the page URL
Tag names and descriptionsAlways: tags are its sections and sidebar groupsOff by default (show-tags="true" turns them on)
Try consoleYesYes
SizingFills the height you give it, usually the viewportGrows with its content inside any container
Render modesread, view and focusedOne: the matched operations
Next Steps

Ready to Integrate RapiDoc?

Check out our Quick Start for copy-paste integration recipes, or explore the complete API reference for full-portal documentation options.