You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api-playground/mdx-setup.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ icon: 'markdown'
6
6
7
7
You can manually define API endpoints in individual `MDX` files rather than using an OpenAPI specification. This method provides flexibility for custom content, but we recommend generating API documentation from an OpenAPI specification file for most API documentation projects as it's more maintainable and feature-rich. However, MDX can be useful for documenting small APIs, prototyping, or when you want to feature API endpoints alongside other content.
8
8
9
-
To generate pages for API endpoints using `MDX`, configure your API settings in `docs.json`, create individual `MDX` files for each endpoint, and use components like <ParamFields /> to define parameters. From these definitions, Mintlify generates interactive API playgrounds, request examples, and response examples.
9
+
To generate pages for API endpoints using `MDX`, configure your API settings in `docs.json`, create individual `MDX` files for each endpoint, and use components like `<ParamFields />` to define parameters. From these definitions, Mintlify generates interactive API playgrounds, request examples, and response examples.
10
10
11
11
<Steps>
12
12
<Steptitle="Configure your API">
@@ -24,7 +24,7 @@ To generate pages for API endpoints using `MDX`, configure your API settings in
24
24
}
25
25
```
26
26
27
-
If you would not like to show an API playground, you don't need to include auth types. Hide the playground with the following field:
27
+
If you want to hide the API playground, use the `display` field. You do not need to include an auth method if you hide the playground.
28
28
29
29
```json
30
30
"api": {
@@ -34,12 +34,12 @@ To generate pages for API endpoints using `MDX`, configure your API settings in
34
34
}
35
35
```
36
36
37
-
Find a full list of API configurations [here](settings#param-api).
37
+
Find a full list of API configurations in [Settings](/settings#api-configurations).
38
38
</Step>
39
39
40
40
<Steptitle="Create your endpoint pages">
41
41
42
-
Each API endpoint page should have a corresponding MDX file. At the top of each file, define:
42
+
Each API endpoint page should have a corresponding `MDX` file. At the top of each file, define`title` and `api`:
43
43
44
44
```md
45
45
---
@@ -56,11 +56,11 @@ To generate pages for API endpoints using `MDX`, configure your API settings in
56
56
57
57
<Note>
58
58
59
-
If you have `server` configured in [docs.json](settings), you can use relative paths like `/v1/endpoint`.
59
+
If you have a `server`field configured in `docs.json`, you can use relative paths like `/v1/endpoint`.
60
60
61
61
</Note>
62
62
63
-
You can also override the globally-defined display mode for the API playground per page by adding `playground` at the top of the MDX file:
63
+
You can override the globally-defined display mode for the API playground per page by adding `playground` at the top of the `MDX` file:
64
64
65
65
```md
66
66
---
@@ -72,6 +72,6 @@ To generate pages for API endpoints using `MDX`, configure your API settings in
72
72
</Step>
73
73
74
74
<Steptitle="Add your endpoints to your docs">
75
-
Add your endpoint pages to the sidebar by adding the paths to the `navigation` field in your `docs.json`. Learn more about structuring your docs [here](navigation).
75
+
Add your endpoint pages to the sidebar by adding the paths to the `navigation` field in your `docs.json`. Learn more about structuring your docs in [Navigation](/navigation).
0 commit comments