Skip to content

Commit 3e8722e

Browse files
mintlify[bot]ethanpalmlawreka
authored
Add documentation for API playground prefill feature (#1461)
* Update organize/settings.mdx * Update api-playground/overview.mdx * Update api-playground/overview.mdx * Apply suggestions from code review * Update api-playground/overview.mdx Co-authored-by: Kathryn Isabelle Lawrence <[email protected]> --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Ethan Palm <[email protected]> Co-authored-by: Kathryn Isabelle Lawrence <[email protected]>
1 parent 858fa76 commit 3e8722e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

api-playground/overview.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ You can customize your API playground by defining the following properties in yo
101101
<ResponseField name="defaults" type="&quot;required&quot; | &quot;all&quot;">
102102
Whether to show optional parameters in API examples. Defaults to `all`.
103103
</ResponseField>
104+
<ResponseField name="prefill" type="boolean">
105+
Whether to prefill the API playground with data from schema examples. When enabled, the playground automatically populates request fields with example values from your OpenAPI specification. Defaults to `false`.
106+
</ResponseField>
104107
</Expandable>
105108
</ResponseField>
106109

@@ -114,13 +117,14 @@ You can customize your API playground by defining the following properties in yo
114117
},
115118
"examples": {
116119
"languages": ["curl", "python", "javascript"],
117-
"defaults": "required"
120+
"defaults": "required",
121+
"prefill": true
118122
}
119123
}
120124
}
121125
```
122126

123-
This example configures the API playground to be interactive with example code snippets for cURL, Python, and JavaScript. Only required parameters are shown in the code snippets.
127+
This example configures the API playground to be interactive with example code snippets for cURL, Python, and JavaScript. Only required parameters are shown in the code snippets, and the playground prefills the request body with example values.
124128

125129
### Custom endpoint pages
126130

organize/settings.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,9 @@ See [Themes](themes) for more information.
669669
<ResponseField name="defaults" type="&quot;required&quot; | &quot;all&quot;">
670670
Whether to show optional parameters in API examples. Defaults to `all`.
671671
</ResponseField>
672+
<ResponseField name="prefill" type="boolean">
673+
Whether to prefill the API playground with data from schema examples. When enabled, the playground automatically populates request fields with example values from your OpenAPI specification. Defaults to `false`.
674+
</ResponseField>
672675
</Expandable>
673676
</ResponseField>
674677
<ResponseField name="mdx" type="object">

0 commit comments

Comments
 (0)