Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fern/products/docs/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ navigation:
- page: Runnable endpoint
path: ./pages/component-library/default-components/runnable-endpoint.mdx
icon: fa-duotone fa-play-circle
- page: Schema
path: ./pages/component-library/default-components/schema.mdx
icon: fa-duotone fa-brackets-curly
- page: Step
path: ./pages/component-library/default-components/steps.mdx
icon: fa-duotone fa-list-ol
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Schema
description: Display any type definition from your API Reference
---

The `<Schema>` component displays type definitions from your API Reference. Use it to render any type schema directly in your documentation pages, making it easy to reference data models, request objects, or response types throughout your docs.

This component is similar to [`<EndpointSchemaSnippet>`](/docs/writing-content/components/endpoint-schema-snippet), but accepts any type name rather than being limited to endpoint-specific schemas.

Before using the `<Schema>` component, you must reference the API in your `docs.yml` file:

```yaml docs.yml
- api: API reference
api-name: docs-yml
```

<Note>
The Schema component can only discover types that are referenced by endpoints in your API definition. Types exclusively referenced by websockets/webhooks or types that aren't referenced at all won't be available.
</Note>

## Usage

<div className="highlight-frame">
<Schema type="AIChatConfig" />
</div>

```jsx Markdown
<Schema type="AIChatConfig" />
```

## Properties

<ParamField path="type" type="string" required={true}>
The name of the type to display. The component will search for this type across all endpoints in your API definition.
</ParamField>

<ParamField path="className" type="string" required={false}>
Optional CSS class name for custom styling.
</ParamField>
Loading
Loading