Skip to content
Open
Show file tree
Hide file tree
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
23 changes: 23 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 @@ -351,6 +351,29 @@

With this configuration, a property like `{ "type": "string", "nullable": true, "x-internal": "admin" }` renders `nullable` and `admin` pills next to its name. Post pills appear in this order: built-in pills (`read-only`, `write-only`), then `api.params.post` config-driven pills, then per-property `x-mint.post` pills.

### Collapse nested playground fields

Start nested object fields collapsed in the API playground by adding `x-mint: playground` with `expand: false` to an operation. This keeps the playground compact for endpoints with large or deeply nested request bodies.

```json {6-10}
{
"paths": {
"/users": {
"post": {
"summary": "Create user",
"x-mint": {
"playground": {
"expand": false
}
}
}
}
}
}
```

The top-level request sections, such as Authorization, Path, Query, and Body, always stay expanded. The setting only collapses object fields nested within those sections. Users can expand any collapsed field manually. When `expand` is omitted, all fields start expanded.

### Group display names

Set a custom display name for a tag's navigation group using the `x-group` extension on a tag object. By default, Mintlify uses the tag `name` as both the navigation group label and the URL path segment. The `x-group` extension overrides the group label while keeping the tag name for the URL.
Expand Down
25 changes: 25 additions & 0 deletions es/api-playground/openapi-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,31 @@ Para mostrar campos arbitrarios de la especificación OpenAPI como píldoras en

Con esta configuración, una propiedad como `{ "type": "string", "nullable": true, "x-internal": "admin" }` renderiza las píldoras `nullable` y `admin` junto a su nombre. Las píldoras post aparecen en este orden: píldoras integradas (`read-only`, `write-only`), luego las píldoras impulsadas por la configuración `api.params.post` y, por último, las píldoras `x-mint.post` por propiedad.

<div id="collapse-nested-playground-fields">
### Contraer campos anidados del playground
</div>

Inicia los campos de objetos anidados contraídos en el playground de API agregando `x-mint: playground` con `expand: false` a una operación. Esto mantiene el playground compacto para endpoints con cuerpos de solicitud grandes o muy anidados.

```json {6-10}
{
"paths": {
"/users": {
"post": {
"summary": "Create user",
"x-mint": {
"playground": {
"expand": false
}
}
}
}
}
}
```

Las secciones de solicitud de nivel superior, como Authorization, Path, Query y Body, siempre permanecen expandidas. La configuración solo contrae los campos de objetos anidados dentro de esas secciones. Los usuarios pueden expandir manualmente cualquier campo contraído. Cuando se omite `expand`, todos los campos inician expandidos.

<div id="group-display-names">
### Nombres de visualización de grupo
</div>
Expand Down
25 changes: 25 additions & 0 deletions fr/api-playground/openapi-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,31 @@ Pour faire apparaître des champs arbitraires de la spécification OpenAPI sous

Avec cette configuration, une propriété telle que `{ "type": "string", "nullable": true, "x-internal": "admin" }` affiche les pastilles `nullable` et `admin` à côté de son nom. Les pastilles post apparaissent dans cet ordre : pastilles intégrées (`read-only`, `write-only`), puis pastilles définies par la configuration `api.params.post`, puis pastilles `x-mint.post` propres à la propriété.

<div id="collapse-nested-playground-fields">
### Réduire les champs imbriqués du playground
</div>

Affichez les champs d'objets imbriqués réduits par défaut dans le playground d'API en ajoutant `x-mint: playground` avec `expand: false` à une opération. Cela garde le playground compact pour les endpoints avec des corps de requête volumineux ou profondément imbriqués.

```json {6-10}
{
"paths": {
"/users": {
"post": {
"summary": "Create user",
"x-mint": {
"playground": {
"expand": false
}
}
}
}
}
}
```

Les sections de requête de premier niveau, comme Authorization, Path, Query et Body, restent toujours développées. Le paramètre réduit uniquement les champs d'objets imbriqués dans ces sections. Les utilisateurs peuvent développer manuellement tout champ réduit. Lorsque `expand` est omis, tous les champs sont développés par défaut.

<div id="group-display-names">
### Noms d'affichage des groupes
</div>
Expand Down
25 changes: 25 additions & 0 deletions zh/api-playground/openapi-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,31 @@ API playground 会使用这些服务器 URL 来确定请求的发送目标。如

通过此配置,类似 `{ "type": "string", "nullable": true, "x-internal": "admin" }` 的属性会在其名称旁渲染 `nullable` 和 `admin` 标签。post 标签按以下顺序显示:内置标签(`read-only`、`write-only`)、由 `api.params.post` 配置驱动的标签,然后是逐属性配置的 `x-mint.post` 标签。

<div id="collapse-nested-playground-fields">
### 折叠 playground 中的嵌套字段
</div>

在操作上添加 `x-mint: playground` 并设置 `expand: false`,使 API playground 中的嵌套对象字段默认折叠。这可以让请求体较大或嵌套较深的端点在 playground 中保持简洁。

```json {6-10}
{
"paths": {
"/users": {
"post": {
"summary": "Create user",
"x-mint": {
"playground": {
"expand": false
}
}
}
}
}
}
```

顶层请求区块(如 Authorization、Path、Query 和 Body)始终保持展开。该设置仅折叠这些区块内嵌套的对象字段。用户可以手动展开任何已折叠的字段。省略 `expand` 时,所有字段默认展开。

<div id="group-display-names">
### 分组显示名称
</div>
Expand Down