OPTIONS

RapiDoc properties

Spec
Theme
color-scheme
Base color scheme mode. 'system' automatically matches the user's OS preference. 'auto' follows the host page: it reads the page's CSS color-scheme (for example :root[data-theme='light'] { color-scheme: light }, as Starlight sets it) and updates when the page switches theme; when the page declares none, it falls back to the OS preference.Default: dark
Dark, light, or follow the system or the page
theme
Brand color preset, or a custom brand color as a hex code. Each preset defines a dark and a light palette.Default: amber
Color palette preset
radius
Corner radius scale applied across cards, buttons, badges, inputs, and dialogs.Default: sm
Border radius for cards, inputs, and buttons
scale
Relative scale factor for typography and UI elements across the documentation portal.Default: default
Global scale for typography and spacing
Layout & Scrolling
render-style
Controls the overall documentation presentation layout. Three distinct modes are supported:
  • view: Optimized for interactive exploration with collapsible operations | Example
  • read: Continuous narrative page layout, ideal for reading through API specifications from top to bottom | Example
  • focused: Displays a single endpoint at a time with a dedicated sidebar, ideal for large enterprise schemas | Example
Default: read
Display mode: Read for docs, View with tabs, Focused for single endpoint
layout
Controls the multi-column orientation of request parameters and response panels on desktop screens (>768px). In 'row' layout, request and response sections sit side-by-side; in 'column' layout, they stack vertically. Defaults to 'column' when render-style is 'read' or 'focused', and 'row' when render-style is 'view'.Default: column (read, focused) / row (view)
Request and response layout: row (side-by-side) or column (stacked)
Schemas
schema-style
Controls the visual representation of complex JSON schemas in request and response panels. 'tree' provides an interactive collapsible tree view; 'table' renders structured tabular rows.Default: tree
Display schemas as visual table or tree hierarchy
default-schema-tab
Selects which tab is active by default, and listed first, for request bodies, responses and object parameters: 'schema' (data contract model) or 'example' (sample JSON payload).Default: example
Default active tab in request and response bodies
schema-expand-level
Initial depth level for auto-expanding complex nested schema properties and sub-objects (the default expands all levels).Default: 99999
Initial expansion depth for nested schemas
schema-hide-read-only
'default' hides read-only properties in request bodies while displaying them in response models and webhook callbacks. Set to 'never' to always display read-only fields across all payloads. Note: This does not affect example generation.Default: default
Hide read-only fields from request body schemas
schema-hide-write-only
'default' hides write-only properties in response bodies while displaying them in request payloads. Set to 'never' to always display write-only fields across all payloads. Note: This does not affect example generation.Default: default
Hide write-only fields from response body schemas
schema-description-expanded
Controls whether schema field constraints, validation rules, and descriptions are fully expanded by default or collapsed to a single line.Default: false
Display full multiline schema property descriptions by default
allow-schema-description-expand-toggle
Shows or hides the button allowing users to toggle between single-line summary and multi-line detailed schema property descriptions.Default: true
Show toggle button for multiline schema descriptions
Authentication
allow-authentication
Controls the display of interactive authentication controls (HTTP Basic, Bearer Token, API Key, OAuth2). Disable to hide authentication dialogs when using hardcoded or pre-authenticated API keys.Default: true
Show the authentication controls
persist-auth
Keeps API keys, bearer tokens and OAuth access tokens in localStorage across page reloads; an OAuth token is dropped once it expires. Basic credentials and OAuth client secrets are never stored.Default: false
Persist API keys and tokens in browser localStorage
Try & Servers
allow-try
Enables the interactive "TRY" console allowing users to test live API calls directly from their browser. Besides true and false, it takes the terms of filter-operations to turn Try on only for the operations they select: !deprecated !tag:pending-implementation keeps it off for deprecated operations and those tagged pending-implementation. The others keep their request documentation and show a disabled TRY DISABLED button. The Authentication section stays usable unless it is false.Default: true
Live interactive endpoint testing console
fill-request-fields-with-example
Pre-populates interactive request parameter inputs and request body fields using example values defined in the OpenAPI spec.Default: true
Pre-populate "Try" console parameters with sample values
show-curl-before-try
When set to true, generates and displays copyable cURL commands directly within the endpoint documentation prior to clicking "TRY".Default: false
Display cURL command before invoking API
allow-server-selection
Enables the dropdown allowing users to switch between target servers declared in the OpenAPI spec.Default: true
Allow switching between configured API server URLs
Mock Server
mock-server
Enables the built-in, zero-dependency in-browser mock server. Transparently intercepts outgoing network requests (both RapiDoc's Try console and host application fetch/XHR calls) and serves mock responses based on OpenAPI examples or generated from schemas.Default: false
Answer Try requests from the in-browser mock server
MCP
mcp
Enables Model Context Protocol (MCP) server export for AI agents. true renders an Export MCP Server button in the overview section that downloads a zip with the MCP manifest (manifest.json), a fixed runtime (runtime.js) and a stdio TypeScript server (server.ts). false, none or an empty value hides the button.Default: false
Shows the Export MCP Server button
Sidebar & Navigation
show-method-in-nav-bar
Displays HTTP methods (GET, POST, etc.) alongside endpoint items in the navigation sidebar. Ensure sufficient contrast if customizing nav-bg-color.Default: false
Sidebar HTTP method badge presentation style
show-badges-in-nav-bar
Marks sidebar items whose operation shows a badge (x-badges, or an OpenAPI 3.2 tag of kind: badge) with a small dot in the first badge's color; its tooltip and accessible label list the badges. Badges with color: none are left out. The dot's shape and size can be styled with the nav-badge-dot CSS part.Default: dot
Dot on sidebar items with badges
nav-item-spacing
Controls vertical density and padding between sidebar navigation items.Default: default
Vertical spacing between sidebar navigation items
use-path-in-nav-bar
Displays raw API URL paths in the navigation bar instead of operation summaries.
NOTE: Setting this to true displays the path only. To display the HTTP method alongside the path, also configure show-method-in-nav-bar.
Default: false
Show URL paths instead of summaries in the sidebar
info-description-headings-in-navbar
Extracts Markdown headings (H1 and H2) from the specification's info description and adds them to the sidebar navigation menu (read mode only).Default: false
Extract H1 and H2 markdown headings into sidebar navigation
update-route
When set to "true", automatically updates the browser's URL address hash as the user scrolls through or clicks on different sections.Default: true
Update browser URL hash when navigating endpoints
Header & Sections
heading-text
Custom title text displayed on the top-left corner of the header.Default: (empty)
Top header title text
show-header
Toggles the top navigation header bar. Set to false to prevent users from loading alternative spec URLs or to seamlessly embed inside existing layouts.Default: true
Display the top navbar header
show-info
Toggles visibility of the OpenAPI document info section (title, description, version, terms of service). Useful when embedding `` into an existing developer portal or knowledge base that already contains its own header.Default: true
Display OpenAPI document title and overview info
allow-search
Enables the instant search and filtering input in the navigation sidebar.Default: true
Enable quick endpoint search bar
allow-advanced-search
Enables deep multi-property search modal, indexing paths, descriptions, parameter names, and response schemas.Default: true
Enable advanced full-text schema and parameter search
show-components
Toggles the components section (schemas, responses, examples, request bodies, headers, security schemes) in both the document body and sidebar menu (available in focused render-style).Default: false
Show the components section
allow-spec-url-load
When set to false, disables the input field allowing users to load arbitrary external OpenAPI specification URLs.Default: true
Allow loading arbitrary OpenAPI spec by URL
allow-spec-file-load
When set to false, hides the file picker allowing users to upload and preview local OpenAPI spec files (desktop viewports >768px).Default: true
Allow uploading and viewing local OpenAPI spec file
allow-spec-file-download
When set to true, displays convenient buttons in the overview section to download the raw OpenAPI specification file or view it in a new tab.Default: false
Show download button for the active OpenAPI spec
Fonts
--font-sans
Main document body and heading font family
--font-mono
Monospace font family for code blocks and schema types
Slots
slot="nav-logo"
Inject custom logo & text HTML into sidebar navigation
slot="fixed-header"
Inject custom sticky announcement or banner HTML above content
slot="(default)"
Inject custom top-level announcement HTML into main content body
Methods & Actions
loadSpec(spec)
Switch the active OpenAPI specification document
scrollToPath(path)
Smoothly scroll to an endpoint or section ID
downloadMcpServer()
Download the MCP server project (manifest, runtime and stdio server) as a zip
Spec & Content
sort-tags
Sorts tags in alphabetical order. When set to "false", preserves the tag order defined in the OpenAPI specification.Default: false
Alphabetically sort tag sections in sidebar