Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions api-playground/openapi-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
}
```

The `x-default` extension supports `apiKey` and `http` bearer security scheme types. The value appears as the default input in the playground's authentication fields. Prefill for security schemes is unconditional and does not require any additional configuration.

Check warning on line 186 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L186

Use 'prefill(s|ing|ed)?' instead of 'Prefill'.

Use `x-default` on other schema properties in your OpenAPI specification to set a default value in the API playground without affecting the `default` field in the schema definition. Unlike security schemes, prefill for non-security-scheme properties only takes effect when you set [`api.examples.prefill`](/organize/settings-api) to `true` in your [`docs.json`](/api-playground/overview#example-configuration).

Expand All @@ -200,7 +200,7 @@
When enabled, clicking the option downloads your OpenAPI spec directly. Deployments with multiple specs receive them bundled as `api-specs.zip`. On deployments behind `auth` or `userAuth`, only authenticated readers can download the spec.

<Warning>
The downloaded OpenAPI spec is unfiltered and does not respect [authentication groups](/deploy/authentication-setup). Any authenticated reader who can open the contextual menu receives the full spec, including endpoints and schemas that would otherwise be hidden from their group. Do not enable `download-spec` on an authenticated site if your OpenAPI spec contains endpoints or fields you consider sensitive.

Check warning on line 203 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L203

In general, use active voice instead of passive voice ('is unfiltered').

Check warning on line 203 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L203

In general, use active voice instead of passive voice ('be hidden').
</Warning>

## Customize your endpoint pages
Expand Down Expand Up @@ -311,6 +311,27 @@
}
```

### Collapse playground sections

Collapse the request sections of the API playground by default using `x-mint: playground` with `expandSections: false` on any operation. When collapsed, readers expand only the sections they want to interact with, like Authorization, Headers, Query, Path, Body, and Server. Sections are expanded by default when `expandSections` is not set.

Check warning on line 316 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L316

In general, use active voice instead of passive voice ('are expanded').

```json {6-10}
{
"paths": {
"/users": {
"get": {
"summary": "Get users",
"x-mint": {
"playground": {
"expandSections": false
}
}
}
}
}
}
```

### Parameter pills

Annotate parameters in the API reference and playground with custom pill labels using `x-mint.pre` and `x-mint.post` on any schema. Pills defined with `x-mint.pre` render before the parameter name, and pills defined with `x-mint.post` render after it, alongside Mintlify's built-in pills like `required`, `read-only`, and `write-only`.
Expand Down