Skip to content

Commit a429d2e

Browse files
Documentation edits made through Mintlify web editor
1 parent 007538e commit a429d2e

File tree

6 files changed

+604
-888
lines changed

6 files changed

+604
-888
lines changed

api-playground/overview.mdx

Lines changed: 77 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,85 @@
11
---
22
title: 'Interactive Playground'
3-
description: 'Enable users to interact with your API'
3+
description: 'Test and explore your API endpoints in real-time'
44
openapi: 'GET /plants/{id}'
55
hideApiMarker: true
66
icon: 'play'
77
---
88

9-
The API playground is an interactive environment to make requests and preview an API endpoint.
9+
## What is the API Playground?
1010

11-
<Info>
12-
Autogenerating API pages with OpenAPI will automatically generate API
13-
playground. Read more about using OpenAPI with Mintlify
14-
[here](/api-playground/openapi).
15-
</Info>
11+
The API playground is an interactive environment that lets you test API endpoints directly in your documentation. Instead of copy-pasting code or using external tools, you can make API calls and see responses right on the page.
12+
13+
<Frame>
14+
<img className="block dark:hidden" src="/images/api-playground-light.png" alt="API Playground Example" />
15+
<img className="hidden dark:block" src="/images/api-playground-dark.png" alt="API Playground Example" />
16+
</Frame>
17+
18+
## Key Features
19+
20+
- **Real-time Testing**: Make API requests and see responses instantly
21+
- **Authentication Support**: Securely test endpoints that require authentication
22+
- **Parameter Editor**: Easily modify query parameters, headers, and request bodies
23+
- **Response Viewer**: See formatted API responses with syntax highlighting
24+
- **Code Snippets**: Get example code in multiple programming languages
25+
26+
## Getting Started
27+
28+
<Steps>
29+
<Step title="Find an API endpoint">
30+
Navigate to any API reference page in the documentation to see the interactive playground.
31+
</Step>
32+
33+
<Step title="Configure parameters">
34+
Fill in any required parameters, headers, or request body fields in the playground interface.
35+
</Step>
36+
37+
<Step title="Send a request">
38+
Click the "Send API Request" button to test the endpoint and see the response.
39+
</Step>
40+
41+
<Step title="View results">
42+
The response will appear below, showing the status code, headers, and formatted response body.
43+
</Step>
44+
</Steps>
45+
46+
<Note>
47+
If you've configured your API documentation using OpenAPI (formerly Swagger), the API playground will be automatically generated for each endpoint. Learn more about using OpenAPI with Mintlify [here](/api-playground/openapi).
48+
</Note>
49+
50+
## Example Playground
51+
52+
Here's an example of what the playground looks like in action:
53+
54+
<Frame>
55+
<img className="block dark:hidden" src="/images/api-playground-example-light.png" alt="API Playground Demo" />
56+
<img className="hidden dark:block" src="/images/api-playground-example-dark.png" alt="API Playground Demo" />
57+
</Frame>
58+
59+
The playground includes:
60+
1. Method selector and endpoint URL
61+
2. Authentication settings (if required)
62+
3. Parameter inputs
63+
4. Request body editor (for POST/PUT requests)
64+
5. Response viewer
65+
6. Code snippet generator
66+
67+
## Common Questions
68+
69+
<AccordionGroup>
70+
<Accordion title="Do I need an API key to use the playground?">
71+
If the API endpoint requires authentication, you'll need the appropriate credentials (like an API key) to make successful requests.
72+
</Accordion>
73+
74+
<Accordion title="Can I save my test configurations?">
75+
Currently, parameter values and configurations are not saved between sessions. We recommend keeping track of commonly used test values separately.
76+
</Accordion>
77+
78+
<Accordion title="Are there any request limitations?">
79+
The playground follows the same rate limits and restrictions as your API. Make sure to check your API's documentation for specific limitations.
80+
</Accordion>
81+
</AccordionGroup>
82+
83+
<Tip>
84+
You can customize how the API playground appears in your documentation using global settings. See the [API playground configuration guide](/api-playground/configuration) for more details.
85+
</Tip>

development.mdx

Lines changed: 79 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
---
22
title: 'Local Development'
3-
description: 'Preview changes locally to update your docs'
3+
description: 'Learn how to preview and test your documentation changes locally'
44
---
55

6-
<Info>
6+
## Prerequisites
77

8-
**Prerequisite**: Please install Node.js (version 19 or higher) before proceeding.
8+
Before you begin, make sure you have:
99

10-
</Info>
10+
1. Installed Node.js version 19 or higher
11+
2. Access to a command line terminal
12+
3. Your documentation files on your local machine
1113

12-
**Step 1**: Install Mintlify:
14+
<Tip>
15+
Not sure if you have Node.js installed? Open your terminal and run `node --version`. If you see a version number ≥ 19, you're good to go. If not, [download Node.js here](https://nodejs.org/).
16+
</Tip>
1317

14-
<CodeGroup>
18+
## Setting Up Local Development
19+
20+
### Step 1: Install Mintlify CLI
21+
22+
Choose one of these commands to install the Mintlify CLI (Command Line Interface) tool:
1523

24+
<CodeGroup>
1625
```bash npm
1726
npm i -g mintlify
1827
```
@@ -24,16 +33,9 @@ description: 'Preview changes locally to update your docs'
2433
```bash pnpm
2534
pnpm add -g mintlify
2635
```
27-
2836
</CodeGroup>
2937

30-
**Step 2**: Navigate to the docs directory (where the `mint.json` file is located) and execute the following command:
31-
32-
```bash
33-
mintlify dev
34-
```
35-
36-
Alternatively, if you do not want to install Mintlify globally you can use a run script available:
38+
Don't want to install globally? You can run Mintlify directly:
3739

3840
<CodeGroup>
3941
```bash npm
@@ -47,35 +49,44 @@ Alternatively, if you do not want to install Mintlify globally you can use a run
4749
```bash pnpm
4850
pnpm dlx mintlify dev
4951
```
50-
5152
</CodeGroup>
5253

53-
<Warning>
54-
Yarn's "dlx" run script requires yarn version >2. See [here](https://yarnpkg.com/cli/dlx) for more information.
55-
</Warning>
54+
<Note>
55+
If using Yarn, make sure you have version 2 or higher for the `dlx` command. [Learn more](https://yarnpkg.com/cli/dlx)
56+
</Note>
5657

57-
A local preview of your documentation will be available at `http://localhost:3000`.
58+
### Step 2: Start the Development Server
5859

59-
### Custom Ports
60+
1. Open your terminal
61+
2. Navigate to your documentation folder (where `mint.json` is located)
62+
3. Run the following command:
6063

61-
By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the `--port` flag. To run Mintlify on port 3333, for instance, use this command:
64+
```bash
65+
mintlify dev
66+
```
67+
68+
Your documentation will now be available at `http://localhost:3000`. Any changes you make to your documentation files will automatically appear on this local preview.
69+
70+
## Customizing Your Setup
71+
72+
### Using a Different Port
73+
74+
By default, Mintlify runs on port 3000. To use a different port:
6275

6376
```bash
6477
mintlify dev --port 3333
6578
```
6679

67-
If you attempt to run Mintlify on a port that's already in use, it will use the next available port:
68-
69-
```md
80+
If your chosen port is already in use, Mintlify will automatically try the next available port:
81+
```text
7082
Port 3000 is already in use. Trying 3001 instead.
7183
```
7284

73-
## Mintlify Versions
85+
### Updating Mintlify
7486

75-
Please note that each CLI release is associated with a specific version of Mintlify. If your local website doesn't align with the production version, please update the CLI:
87+
Keep your Mintlify CLI up to date to ensure you have the latest features. Update using the same tool you used to install:
7688

7789
<CodeGroup>
78-
7990
```bash npm
8091
npm i -g mintlify@latest
8192
```
@@ -87,45 +98,62 @@ Please note that each CLI release is associated with a specific version of Mintl
8798
```bash pnpm
8899
pnpm up --global mintlify
89100
```
90-
91101
</CodeGroup>
92102

93-
## Validating Links
103+
## Development Tools
94104

95-
The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:
105+
### Check for Broken Links
106+
107+
Find and fix broken links in your documentation with this command:
96108

97109
```bash
98110
mintlify broken-links
99111
```
100112

101-
## Deployment
102-
103-
If the deployment is successful, you should see the following:
104-
105-
<Frame>
106-
<img
107-
className="rounded-md"
108-
src="https://mintlify.s3-us-west-1.amazonaws.com/mintlify/images/checks-passed.png"
109-
/>
110-
</Frame>
113+
### Code Editor Setup
111114

112-
## Code Formatting
115+
For the best development experience, we recommend:
113116

114-
We suggest using extensions on your IDE to recognize and format MDX. If you're a VSCode user, consider the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
117+
1. Install the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for proper syntax highlighting
118+
2. Use [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for consistent formatting
115119

116-
## Troubleshooting
120+
## Common Issues and Solutions
117121

118122
<AccordionGroup>
119-
<Accordion title='Error: Could not load the "sharp" module using the darwin-arm64 runtime'>
123+
<Accordion title="Sharp Module Error on Mac (M1/M2)">
124+
If you see an error about the "sharp" module on Mac:
125+
1. Uninstall Mintlify: `npm remove -g mintlify`
126+
2. Update to Node.js v19 or higher
127+
3. Reinstall Mintlify: `npm install -g mintlify`
128+
</Accordion>
120129

121-
This may be due to an outdated version of node. Try the following:
122-
1. Remove the currently-installed version of mintlify: `npm remove -g mintlify`
123-
2. Upgrade to Node v19 or higher.
124-
3. Reinstall mintlify: `npm install -g mintlify`
130+
<Accordion title="Unknown Errors">
131+
If you encounter unexpected issues:
132+
1. Open your terminal
133+
2. Navigate to your home directory: `cd ~`
134+
3. Delete the Mintlify folder: `rm -rf .mintlify`
135+
4. Try running `mintlify dev` again
125136
</Accordion>
126137

127-
<Accordion title="Issue: Encountering an unknown error">
128-
129-
Solution: Go to the root of your device and delete the \~/.mintlify folder. Afterwards, run `mintlify dev` again.
138+
<Accordion title="Changes Not Showing Up">
139+
If your changes aren't appearing:
140+
1. Check that your development server is running
141+
2. Try refreshing your browser
142+
3. Clear your browser cache
143+
4. Restart the development server
130144
</Accordion>
131145
</AccordionGroup>
146+
147+
## Deployment Status
148+
149+
When your changes are successfully deployed, you'll see this confirmation:
150+
151+
<Frame>
152+
<img
153+
className="rounded-md"
154+
src="https://mintlify.s3-us-west-1.amazonaws.com/mintlify/images/checks-passed.png"
155+
alt="Successful deployment status showing green checkmarks"
156+
/>
157+
</Frame>
158+
159+
Need help? Join our [community](https://mintlify.com/community) or contact [support](mailto:[email protected]).

mint.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,16 @@
6565
"icon": "pen-paintbrush",
6666
"pages": [
6767
"development",
68-
"web-editor"
68+
"web-editor",
69+
"quickstart"
6970
]
7071
},
7172
"settings/global",
7273
"settings/navigation",
73-
"migration"
74+
"migration",
75+
"development",
76+
"settings/global",
77+
"snippets/getting-started"
7478
]
7579
},
7680
{
@@ -105,7 +109,8 @@
105109
"api-playground/mdx/authentication"
106110
]
107111
},
108-
"api-playground/troubleshooting"
112+
"api-playground/troubleshooting",
113+
"api-playground/overview"
109114
]
110115
},
111116
{
@@ -192,11 +197,10 @@
192197
{
193198
"group": "Chat API",
194199
"pages": [
195-
"advanced/rest-api/chat/create-topic",
196-
"advanced/rest-api/chat/generate-message"
197-
]
198-
}
199-
200+
"advanced/rest-api/chat/create-topic",
201+
"advanced/rest-api/chat/generate-message"
202+
]
203+
}
200204
]
201205
}
202206
]

0 commit comments

Comments
 (0)