api field in docs.json to configure what API specifications generate API pages, the interactive API playground for testing endpoints, and how to generate and display code examples.
Settings
api
Type: object
Define all API-related settings under the api key.
OpenAPI specification files for generating API reference pages. Accepts a single path or URL, an array of paths, URLs, and objects, or an object specifying a source, directory, and overlays.
AsyncAPI specification files for generating event-driven API reference pages. Accepts a single path or URL, an array of paths and URLs, or an object specifying a source and directory.
How optional request fields display in the API playground. Required fields always appear first. Defaults to
collapsed.collapsed: Hide optional fields behind an expand control in each section.expanded: Show optional fields by default. Readers can still collapse them.static: Always show optional fields after required fields, with no expand or collapse controls.
Display mode for the base URL in the endpoint header. Set to
full to always show the complete base URL on every endpoint page. By default, the base URL is only shown when there are multiple base URLs to select from.Example
docs.json