Schema
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:
Properties
The name of the type to display. The component will search for this type across all endpoints in your API definition.
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.
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.
A list of field names to exclude from the rendered schema.
If true, hides deprecated fields from the rendered schema.
Optional CSS class name for custom styling.