Endpoint Schema Snippet

The EndpointSchemaSnippet component is used to reference an endpoint’s schema from your API Reference. Below are examples of referencing the schema for the POST /snippets endpoint.

If you want to reference a particular piece of the schema, you can use the optional selector prop to specify the path to the schema you want to reference. The available selectors are: request, request.path, request.query, request.body, response, and response.body.

Full Request


Passing request as the selector will only render the request schema.

The following markdown:

1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request" />

will be rendered as:


Path parameters

domainstringRequired

Request

messageslist of objectsRequired
The messages to use for the chat completion
modelenum or nullOptional
The model to use for the chat completion
Allowed values:
system_promptstring or nullOptional
The system prompt to use for the chat completion

The EndpointSchemaSnippet component does not yet support rendering markdown-rich field descriptions.

See request.endpoint.path above for an example of a markdown-rich description that does not yet render as markdown.