Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ description: 'Reference an endpoint request from your API Reference'
---

The `EndpointRequestSnippet` component is used to reference an endpoint request from
your API Reference. Below is an example of referencing the request for the `POST /snippets` endpoint.
your API Reference. Below is an example of referencing the request for the `POST /chat/{domain}` endpoint.

<CodeBlock title="Markdown">
```jsx
<EndpointRequestSnippet endpoint="POST /snippets" />
<EndpointRequestSnippet endpoint="POST /chat/{domain}" />
```
</CodeBlock>

will be rendered as:

<EndpointRequestSnippet endpoint="POST /snippets" />
<EndpointRequestSnippet endpoint="POST /chat/{domain}" />

### Reference particular examples

Expand All @@ -28,7 +28,7 @@ to the name of the example. See the steps below:

<AccordionGroup>
<Accordion title="OpenAPI">
```yaml {12}
```yaml openapi.yml {12}
paths:
/pet:
put:
Expand All @@ -47,7 +47,7 @@ to the name of the example. See the steps below:
```
</Accordion>
<Accordion title="Fern Definition">
```yaml {11}
```yaml pets.yml {11}
service:
auth: true
base-path: ""
Expand All @@ -71,7 +71,7 @@ to the name of the example. See the steps below:
In the API Definition, the example had a name `ExampleWithMarkley`. You can reference
the example directly:

```jsx {3}
```jsx Markdown {3}
<EndpointRequestSnippet
endpoint="PUT /pet"
example="ExampleWithMarkley"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ description: 'Reference an endpoint response from your API Reference'

The `EndpointResponseSnippet` component is used to reference an endpoint
response from your API Reference. Below is an example of referencing the
response for the `POST /snippets` endpoint.
response for the `POST /chat/{domain}` endpoint.

<CodeBlock title="Markdown">
```jsx
<EndpointResponseSnippet endpoint='POST /snippets' />
<EndpointResponseSnippet endpoint='POST /chat/{domain}' />
```
</CodeBlock>

will be rendered as

<EndpointResponseSnippet endpoint='POST /snippets' />
<EndpointResponseSnippet endpoint='POST /chat/{domain}' />


### Reference particular examples
Expand All @@ -30,7 +30,7 @@ to the name of the example. See the steps below:

<AccordionGroup>
<Accordion title="OpenAPI">
```yaml {13}
```yaml openapi.yml {13}
paths:
/pet/{petId}:
put:
Expand All @@ -51,7 +51,7 @@ to the name of the example. See the steps below:
```
</Accordion>
<Accordion title="Fern Definition">
```yaml {11}
```yaml pets.yml {11}
service:
auth: true
base-path: ""
Expand All @@ -77,7 +77,7 @@ to the name of the example. See the steps below:
In the API Definition, the example had a name `ExampleWithMarkley`. You can reference
the example directly:

```jsx {3}
```jsx Markdown {3}
<EndpointResponseSnippet
endpoint="GET /pet/{petId}"
example="ExampleWithMarkley"
Expand Down