Skip to content

Commit e0afedf

Browse files
devin-ai-integration[bot]dsinghvidevalog
authored
Document Runnable Endpoint component and add changelog entry (#1281)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Deep Singhvi <[email protected]> Co-authored-by: Devin Logan <[email protected]>
1 parent 621a43a commit e0afedf

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed

fern/products/docs/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ navigation:
7777
path: ./pages/component-library/default-components/endpoint-schema-snippet.mdx
7878
icon: fa-duotone fa-sitemap
7979
slug: schema-snippet
80+
- page: Runnable Endpoint
81+
path: ./pages/component-library/default-components/runnable-endpoint.mdx
82+
icon: fa-duotone fa-play-circle
8083
- page: Frames
8184
path: ./pages/component-library/default-components/frames.mdx
8285
icon: fa-duotone fa-window-maximize
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Introducing Runnable Endpoint
2+
3+
Test API endpoints directly from your documentation with our new interactive component. Runnable Endpoint allows your users to send real HTTP requests to your API without leaving your docs, making it easier for developers to explore and understand your API.
4+
5+
<Frame>
6+
![Runnable Endpoint component](runnable-endpoint.png)
7+
</Frame>
8+
9+
Embed the component anywhere in your MDX documentation to create an interactive request builder with form inputs for headers, path parameters, query parameters, and request bodies. Users can execute requests and see real-time responses, complete with status codes and syntax highlighting.
10+
11+
Key features include:
12+
13+
- **Interactive form builder** that automatically generates inputs based on your endpoint definition
14+
- **Multiple examples support** with a dropdown selector when you have multiple pre-configured scenarios
15+
- **Environment selector** for testing against production, staging, or development
16+
- **Form persistence** that saves user input in local storage across sessions
17+
- **Direct navigation** to the full API reference with an "Open in API reference" button
18+
19+
To learn more about using Runnable Endpoints in your documentation, visit the [Runnable Endpoint docs](/learn/docs/writing-content/components/runnable-endpoint).
63.5 KB
Loading
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Runnable Endpoint
3+
description: Test API endpoints directly from your documentation with an interactive request builder.
4+
---
5+
6+
The `<RunnableEndpoint>` component enables users to make real HTTP requests to your APIs directly in the API Reference. It auto-detects endpoint definitions from your API specification and provides a request builder with inputs for headers, path parameters, query parameters, and request bodies.
7+
8+
<Tabs>
9+
<Tab title="Example">
10+
11+
![Runnable Endpoint component example](runnable-endpoint.png)
12+
13+
</Tab>
14+
<Tab title="Markdown">
15+
````jsx
16+
<RunnableEndpoint endpoint="GET /api/users/{id}" />
17+
````
18+
</Tab>
19+
</Tabs>
20+
21+
## Features
22+
23+
The Runnable Endpoint supports:
24+
- **Multiple examples** – When your endpoint has multiple pre-configured examples, the component displays a dropdown selector in the header so users can switch between different examples
25+
- **Multiple environments** – If your API defines multiple environments (production, staging, development), the component automatically displays an environment selector so users can test against different base URLs
26+
- **API Reference integration** – Each Runnable Endpoint includes a button that links users to the full API reference documentation for the endpoint
27+
- **Real-time response preview** – Users can view response status, headers, body, and response time immediately after sending requests
28+
- **Form persistence** – Form inputs are automatically persisted in the browser's local storage, so users' test data is preserved even when navigating between pages or refreshing the browser
29+
30+
## Properties
31+
32+
<ParamField path="endpoint" type="string" required={false}>
33+
The endpoint locator in the format "METHOD /path". For example: `"POST /api/users"` or `"GET /api/users/{id}"`.
34+
</ParamField>
35+
36+
<ParamField path="example" type="string" required={false}>
37+
Pre-fill the form with a specific example by name. If not specified, the first example is used by default.
38+
</ParamField>
39+
40+
<ParamField path="className" type="string" required={false}>
41+
CSS class name for custom styling of the component container.
42+
</ParamField>
63.5 KB
Loading

0 commit comments

Comments
 (0)