Schema

View as Markdown

The <Schema> component displays type definitions from your API Reference anywhere in your documentation. Use it to reference data models, request objects, or response types outside of your API Reference pages.

Similar to <EndpointSchemaSnippet>, but accepts any type name rather than being limited to endpoint-specific schemas. Pair with <SchemaSnippet> to display the JSON representation alongside the field breakdown.

The component only discovers types referenced by endpoints. Types exclusively used by websockets or webhooks won’t be available. If multiple APIs have the same type name, the component returns the first match.

Usage

The component works with API references already configured in your docs.yml. This example displays the AIChatConfig type from the docs-yml API:

modelenumOptional
Allowed values:
system-promptstringOptional
This is a system prompt that acts as context given to the LLM for AI chat.
Markdown
1<Schema type="AIChatConfig" />

Properties

type
stringRequired

The name of the type to display. The component will search for this type across all endpoints in your API definition.

api
string

The name of the API to fetch the type from. If not specified, the type will be fetched from the first API that contains it.

description
boolean

If true, includes the type definition’s description above the schema fields. This is useful for displaying comments associated with the type, such as Protobuf message comments.

exclude
string[]

A list of field names to exclude from the rendered schema.

excludeDeprecated
boolean

If true, hides deprecated fields from the rendered schema.

className
string

Optional CSS class name for custom styling.