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/configuration.mdx
+4-45Lines changed: 4 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ To generate pages for API endpoints using `MDX`, configure your API settings in
59
59
60
60
</Note>
61
61
62
-
You can override the globally-defined display mode for the API playground per page by adding `playground`at the top of the `MDX` file:
62
+
You can override the globally-defined display mode for the API playground for a page by adding `playground`to the frontmatter:
63
63
64
64
```mdx
65
65
---
@@ -69,51 +69,10 @@ To generate pages for API endpoints using `MDX`, configure your API settings in
69
69
---
70
70
```
71
71
72
-
## Page-level playground control
72
+
-`playground: 'interactive'` - Display the interactive playground.
73
+
-`playground: 'simple'` - Display a copyable endpoint with no playground.
74
+
-`playground: 'none'` - Hide the playground.
73
75
74
-
The `playground` frontmatter property allows you to control the API playground functionality on individual pages, overriding any global settings defined in `docs.json`. This is particularly useful for endpoints that don't benefit from interactive testing.
75
-
76
-
### Available options
77
-
78
-
-`playground: 'interactive'` - Full interactive playground with request forms and response display
79
-
-`playground: 'simple'` - Shows a copyable endpoint with no interactive elements
80
-
-`playground: 'none'` - Completely hides the playground section
81
-
82
-
### Common use cases
83
-
84
-
**Webhook endpoints**: Since webhooks are triggered by external systems rather than user requests, an interactive playground isn't useful. Use `playground: 'none'` to focus on documentation:
0 commit comments