From 73f522ebf4812d1147957e1fa4c57a0c704cae74 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 20:44:28 +0000 Subject: [PATCH 1/5] docs: document OpenAPI 3.1 file uploads --- api-playground/openapi-setup.mdx | 36 +++++++++++++++++++++++++++ es/api-playground/openapi-setup.mdx | 38 +++++++++++++++++++++++++++++ fr/api-playground/openapi-setup.mdx | 38 +++++++++++++++++++++++++++++ zh/api-playground/openapi-setup.mdx | 38 +++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+) diff --git a/api-playground/openapi-setup.mdx b/api-playground/openapi-setup.mdx index e371841bc4..8d6a5fb592 100644 --- a/api-playground/openapi-setup.mdx +++ b/api-playground/openapi-setup.mdx @@ -78,6 +78,42 @@ The API playground uses these server URLs to determine where to send requests. I If your API has endpoints that exist at different URLs, you can [override the `servers` field](https://swagger.io/docs/specification/v3_0/api-host-and-base-path/#overriding-servers) for a given path or operation. +### Configure file uploads + +For OpenAPI 3.1 specifications, define a file upload as a string schema with a binary `contentMediaType`. The API playground recognizes the field as a file input and sends it as part of a `multipart/form-data` request. + +Use this configuration when an endpoint accepts a file inside a multipart request. You can also use `contentEncoding` to describe how the file content is encoded. A `contentEncoding` value without a binary `contentMediaType` remains a text field. + +```json +{ + "paths": { + "/imports": { + "post": { + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "application/octet-stream" + } + }, + "required": ["file"] + } + } + } + } + } + } + } +} +``` + +You can use binary media types such as `application/octet-stream`, images, audio, video, PDFs, and archives. Structured media types such as `application/json` are not treated as file uploads. The older `format: "binary"` and `format: "base64"` values remain supported. + ### Specify authentication To enable authentication in your API documentation and playground, configure the `securitySchemes` and `security` fields in your OpenAPI specification. The API descriptions and API playground add authentication fields based on the security configurations in your OpenAPI specification. diff --git a/es/api-playground/openapi-setup.mdx b/es/api-playground/openapi-setup.mdx index f66e75440d..721d371ad7 100644 --- a/es/api-playground/openapi-setup.mdx +++ b/es/api-playground/openapi-setup.mdx @@ -84,6 +84,44 @@ El área de pruebas de la API usa estas URL de servidor para determinar adónde Si tu API tiene endpoints que se encuentran en distintas URL, puedes [sobrescribir el campo `servers`](https://swagger.io/docs/specification/v3_0/api-host-and-base-path/#overriding-servers) para una ruta u operación determinada. +
+ ### Configura cargas de archivos +
+ +En las especificaciones OpenAPI 3.1, define una carga de archivo como un esquema de tipo string con un `contentMediaType` binario. El playground de la API reconoce el campo como un selector de archivos y lo envía como parte de una solicitud `multipart/form-data`. + +Usa esta configuración cuando un endpoint acepte un archivo dentro de una solicitud multipart. También puedes usar `contentEncoding` para describir cómo se codifica el contenido del archivo. Un valor `contentEncoding` sin un `contentMediaType` binario sigue siendo un campo de texto. + +```json +{ + "paths": { + "/imports": { + "post": { + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "application/octet-stream" + } + }, + "required": ["file"] + } + } + } + } + } + } + } +} +``` + +Puedes usar tipos MIME binarios como `application/octet-stream`, imágenes, audio, video, PDF y archivos comprimidos. Los tipos estructurados como `application/json` no se tratan como cargas de archivos. Los valores anteriores `format: "binary"` y `format: "base64"` siguen siendo compatibles. +
### Especificar la autenticación
diff --git a/fr/api-playground/openapi-setup.mdx b/fr/api-playground/openapi-setup.mdx index 2716eeaf8e..0d5916cf2d 100644 --- a/fr/api-playground/openapi-setup.mdx +++ b/fr/api-playground/openapi-setup.mdx @@ -84,6 +84,44 @@ Le bac à sable de l’API utilise ces URL de serveur pour déterminer où envoy Si votre API comporte des points de terminaison accessibles à différentes URL, vous pouvez [surcharger le champ `servers`](https://swagger.io/docs/specification/v3_0/api-host-and-base-path/#overriding-servers) pour un chemin ou une opération donnés. +
+ ### Configurer les importations de fichiers +
+ +Dans les spécifications OpenAPI 3.1, définissez une importation de fichier comme un schéma de type string avec un `contentMediaType` binaire. Le playground de l’API reconnaît le champ comme un sélecteur de fichier et l’envoie dans une requête `multipart/form-data`. + +Utilisez cette configuration lorsqu’un endpoint accepte un fichier dans une requête multipart. Vous pouvez également utiliser `contentEncoding` pour décrire le codage du contenu du fichier. Une valeur `contentEncoding` sans `contentMediaType` binaire reste un champ texte. + +```json +{ + "paths": { + "/imports": { + "post": { + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "application/octet-stream" + } + }, + "required": ["file"] + } + } + } + } + } + } + } +} +``` + +Vous pouvez utiliser des types MIME binaires tels que `application/octet-stream`, les images, l’audio, la vidéo, les PDF et les archives. Les types structurés tels que `application/json` ne sont pas traités comme des importations de fichiers. Les anciennes valeurs `format: "binary"` et `format: "base64"` restent prises en charge. +
### Spécifier l’authentification
diff --git a/zh/api-playground/openapi-setup.mdx b/zh/api-playground/openapi-setup.mdx index e6e26fe1ff..dc44055b76 100644 --- a/zh/api-playground/openapi-setup.mdx +++ b/zh/api-playground/openapi-setup.mdx @@ -84,6 +84,44 @@ API playground 会使用这些服务器 URL 来确定请求的发送目标。如 如果你的 API 的端点分布在不同的 URL 下,你可以为特定路径或操作[覆盖 `servers` 字段](https://swagger.io/docs/specification/v3_0/api-host-and-base-path/#overriding-servers)。 +
+ ### 配置文件上传 +
+ +对于 OpenAPI 3.1 规范,请将文件上传定义为带有二进制 `contentMediaType` 的 string 类型 schema。API playground 会将该字段识别为文件选择器,并将其作为 `multipart/form-data` 请求的一部分发送。 + +当端点在 multipart 请求中接收文件时,请使用此配置。你也可以使用 `contentEncoding` 描述文件内容的编码方式。没有二进制 `contentMediaType` 的 `contentEncoding` 值仍会被视为文本字段。 + +```json +{ + "paths": { + "/imports": { + "post": { + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "application/octet-stream" + } + }, + "required": ["file"] + } + } + } + } + } + } + } +} +``` + +你可以使用 `application/octet-stream`、图像、音频、视频、PDF 和归档文件等二进制媒体类型。`application/json` 等结构化媒体类型不会被视为文件上传。旧版 `format: "binary"` 和 `format: "base64"` 值仍受支持。 +
### 指定身份验证
From 3a5619dd2e98ab1a433289431440bdda4e8628b4 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 20:46:26 +0000 Subject: [PATCH 2/5] fix: improve translated OpenAPI page metadata --- zh/api-playground/openapi-setup.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh/api-playground/openapi-setup.mdx b/zh/api-playground/openapi-setup.mdx index dc44055b76..7cbe785c00 100644 --- a/zh/api-playground/openapi-setup.mdx +++ b/zh/api-playground/openapi-setup.mdx @@ -1,6 +1,6 @@ --- title: "OpenAPI 设置" -description: "从 OpenAPI 规范文件生成交互式 API 文档,自动创建端点页面、请求构建器和导航结构。" +description: "从 OpenAPI 3.0 和 3.1 规范文件生成交互式 API 文档,自动创建端点页面、请求构建器和导航结构,并支持身份验证、服务器 URL 与文件上传配置。" keywords: ["OpenAPI", "API 规范", "Swagger"] --- From fd63edc2f2784170791725f578730433ae8f8f65 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 00:44:28 +0000 Subject: [PATCH 3/5] docs: clarify OpenAPI file encoding behavior --- api-playground/openapi-setup.mdx | 2 +- es/api-playground/openapi-setup.mdx | 2 +- fr/api-playground/openapi-setup.mdx | 2 +- zh/api-playground/openapi-setup.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api-playground/openapi-setup.mdx b/api-playground/openapi-setup.mdx index 8d6a5fb592..ebed923ac5 100644 --- a/api-playground/openapi-setup.mdx +++ b/api-playground/openapi-setup.mdx @@ -82,7 +82,7 @@ If your API has endpoints that exist at different URLs, you can [override the `s For OpenAPI 3.1 specifications, define a file upload as a string schema with a binary `contentMediaType`. The API playground recognizes the field as a file input and sends it as part of a `multipart/form-data` request. -Use this configuration when an endpoint accepts a file inside a multipart request. You can also use `contentEncoding` to describe how the file content is encoded. A `contentEncoding` value without a binary `contentMediaType` remains a text field. +Use this configuration when an endpoint accepts a file inside a multipart request. You can also use `contentEncoding` to describe how the file content is encoded. A `contentEncoding` value without a binary `contentMediaType` remains a text field. For base64-encoded files, set `contentEncoding` to `base64` or `base64url`. The API playground treats either value as a base64 file. Other values, or no value, use binary file handling. ```json { diff --git a/es/api-playground/openapi-setup.mdx b/es/api-playground/openapi-setup.mdx index 721d371ad7..8f81a6d9ca 100644 --- a/es/api-playground/openapi-setup.mdx +++ b/es/api-playground/openapi-setup.mdx @@ -90,7 +90,7 @@ Si tu API tiene endpoints que se encuentran en distintas URL, puedes [sobrescrib En las especificaciones OpenAPI 3.1, define una carga de archivo como un esquema de tipo string con un `contentMediaType` binario. El playground de la API reconoce el campo como un selector de archivos y lo envía como parte de una solicitud `multipart/form-data`. -Usa esta configuración cuando un endpoint acepte un archivo dentro de una solicitud multipart. También puedes usar `contentEncoding` para describir cómo se codifica el contenido del archivo. Un valor `contentEncoding` sin un `contentMediaType` binario sigue siendo un campo de texto. +Usa esta configuración cuando un endpoint acepte un archivo dentro de una solicitud multipart. También puedes usar `contentEncoding` para describir cómo se codifica el contenido del archivo. Un valor `contentEncoding` sin un `contentMediaType` binario sigue siendo un campo de texto. Para archivos codificados en base64, establece `contentEncoding` en `base64` o `base64url`. El playground trata ambos valores como un archivo base64. Otros valores, o la ausencia de un valor, usan el procesamiento de archivos binarios. ```json { diff --git a/fr/api-playground/openapi-setup.mdx b/fr/api-playground/openapi-setup.mdx index 0d5916cf2d..ef3b1cd589 100644 --- a/fr/api-playground/openapi-setup.mdx +++ b/fr/api-playground/openapi-setup.mdx @@ -90,7 +90,7 @@ Si votre API comporte des points de terminaison accessibles à différentes URL, Dans les spécifications OpenAPI 3.1, définissez une importation de fichier comme un schéma de type string avec un `contentMediaType` binaire. Le playground de l’API reconnaît le champ comme un sélecteur de fichier et l’envoie dans une requête `multipart/form-data`. -Utilisez cette configuration lorsqu’un endpoint accepte un fichier dans une requête multipart. Vous pouvez également utiliser `contentEncoding` pour décrire le codage du contenu du fichier. Une valeur `contentEncoding` sans `contentMediaType` binaire reste un champ texte. +Utilisez cette configuration lorsqu’un endpoint accepte un fichier dans une requête multipart. Vous pouvez également utiliser `contentEncoding` pour décrire le codage du contenu du fichier. Une valeur `contentEncoding` sans `contentMediaType` binaire reste un champ texte. Pour les fichiers encodés en base64, définissez `contentEncoding` sur `base64` ou `base64url`. Le playground traite ces deux valeurs comme un fichier base64. Les autres valeurs, ou l’absence de valeur, utilisent le traitement des fichiers binaires. ```json { diff --git a/zh/api-playground/openapi-setup.mdx b/zh/api-playground/openapi-setup.mdx index 7cbe785c00..ce75d15aa9 100644 --- a/zh/api-playground/openapi-setup.mdx +++ b/zh/api-playground/openapi-setup.mdx @@ -90,7 +90,7 @@ API playground 会使用这些服务器 URL 来确定请求的发送目标。如 对于 OpenAPI 3.1 规范,请将文件上传定义为带有二进制 `contentMediaType` 的 string 类型 schema。API playground 会将该字段识别为文件选择器,并将其作为 `multipart/form-data` 请求的一部分发送。 -当端点在 multipart 请求中接收文件时,请使用此配置。你也可以使用 `contentEncoding` 描述文件内容的编码方式。没有二进制 `contentMediaType` 的 `contentEncoding` 值仍会被视为文本字段。 +当端点在 multipart 请求中接收文件时,请使用此配置。你也可以使用 `contentEncoding` 描述文件内容的编码方式。没有二进制 `contentMediaType` 的 `contentEncoding` 值仍会被视为文本字段。对于使用 base64 编码的文件,请将 `contentEncoding` 设置为 `base64` 或 `base64url`。API playground 会将这两个值识别为 base64 文件。其他值或未设置值时,会按二进制文件处理。 ```json { From ea77b6d7baa6733321ad0c65f3aaaa5be96161fb Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 00:49:30 +0000 Subject: [PATCH 4/5] fix: polish OpenAPI upload documentation --- api-playground/openapi-setup.mdx | 4 ++-- es/api-playground/openapi-setup.mdx | 4 ++-- fr/api-playground/openapi-setup.mdx | 8 ++++---- zh/api-playground/openapi-setup.mdx | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/api-playground/openapi-setup.mdx b/api-playground/openapi-setup.mdx index ebed923ac5..f3b70a8cf5 100644 --- a/api-playground/openapi-setup.mdx +++ b/api-playground/openapi-setup.mdx @@ -82,7 +82,7 @@ If your API has endpoints that exist at different URLs, you can [override the `s For OpenAPI 3.1 specifications, define a file upload as a string schema with a binary `contentMediaType`. The API playground recognizes the field as a file input and sends it as part of a `multipart/form-data` request. -Use this configuration when an endpoint accepts a file inside a multipart request. You can also use `contentEncoding` to describe how the file content is encoded. A `contentEncoding` value without a binary `contentMediaType` remains a text field. For base64-encoded files, set `contentEncoding` to `base64` or `base64url`. The API playground treats either value as a base64 file. Other values, or no value, use binary file handling. +Use this configuration when an endpoint accepts a file inside a multipart request. You can also use `contentEncoding` to describe how the file content is encoded. A `contentEncoding` value without a binary `contentMediaType` remains a text field. For base64-encoded files, set `contentEncoding` to `base64` or `base64url`. The API playground treats either value as a base64 file. For other values or no value, the API playground uses binary file handling. ```json { @@ -112,7 +112,7 @@ Use this configuration when an endpoint accepts a file inside a multipart reques } ``` -You can use binary media types such as `application/octet-stream`, images, audio, video, PDFs, and archives. Structured media types such as `application/json` are not treated as file uploads. The older `format: "binary"` and `format: "base64"` values remain supported. +You can use binary media types such as `application/octet-stream`, images, audio, video, PDFs, and archives. The API playground does not treat structured media types such as `application/json` as file uploads. The older `format: "binary"` and `format: "base64"` values remain supported. ### Specify authentication diff --git a/es/api-playground/openapi-setup.mdx b/es/api-playground/openapi-setup.mdx index 8f81a6d9ca..3be76afcc2 100644 --- a/es/api-playground/openapi-setup.mdx +++ b/es/api-playground/openapi-setup.mdx @@ -90,7 +90,7 @@ Si tu API tiene endpoints que se encuentran en distintas URL, puedes [sobrescrib En las especificaciones OpenAPI 3.1, define una carga de archivo como un esquema de tipo string con un `contentMediaType` binario. El playground de la API reconoce el campo como un selector de archivos y lo envía como parte de una solicitud `multipart/form-data`. -Usa esta configuración cuando un endpoint acepte un archivo dentro de una solicitud multipart. También puedes usar `contentEncoding` para describir cómo se codifica el contenido del archivo. Un valor `contentEncoding` sin un `contentMediaType` binario sigue siendo un campo de texto. Para archivos codificados en base64, establece `contentEncoding` en `base64` o `base64url`. El playground trata ambos valores como un archivo base64. Otros valores, o la ausencia de un valor, usan el procesamiento de archivos binarios. +Usa esta configuración cuando un endpoint acepte un archivo dentro de una solicitud multipart. También puedes usar `contentEncoding` para describir cómo se codifica el contenido del archivo. Un valor `contentEncoding` sin un `contentMediaType` binario sigue siendo un campo de texto. Para archivos codificados en base64, establece `contentEncoding` en `base64` o `base64url`. El playground trata ambos valores como un archivo base64. Para otros valores o cuando no se define ningún valor, el playground usa el procesamiento de archivos binarios. ```json { @@ -120,7 +120,7 @@ Usa esta configuración cuando un endpoint acepte un archivo dentro de una solic } ``` -Puedes usar tipos MIME binarios como `application/octet-stream`, imágenes, audio, video, PDF y archivos comprimidos. Los tipos estructurados como `application/json` no se tratan como cargas de archivos. Los valores anteriores `format: "binary"` y `format: "base64"` siguen siendo compatibles. +Puedes usar tipos MIME binarios como `application/octet-stream`, imágenes, audio, video, PDF y archivos comprimidos. El playground de la API no trata los tipos estructurados como `application/json` como cargas de archivos. Los valores anteriores `format: "binary"` y `format: "base64"` siguen siendo compatibles.
### Especificar la autenticación diff --git a/fr/api-playground/openapi-setup.mdx b/fr/api-playground/openapi-setup.mdx index ef3b1cd589..52001ba5e8 100644 --- a/fr/api-playground/openapi-setup.mdx +++ b/fr/api-playground/openapi-setup.mdx @@ -85,12 +85,12 @@ Le bac à sable de l’API utilise ces URL de serveur pour déterminer où envoy Si votre API comporte des points de terminaison accessibles à différentes URL, vous pouvez [surcharger le champ `servers`](https://swagger.io/docs/specification/v3_0/api-host-and-base-path/#overriding-servers) pour un chemin ou une opération donnés.
- ### Configurer les importations de fichiers + ### Configurer les téléversements de fichiers
-Dans les spécifications OpenAPI 3.1, définissez une importation de fichier comme un schéma de type string avec un `contentMediaType` binaire. Le playground de l’API reconnaît le champ comme un sélecteur de fichier et l’envoie dans une requête `multipart/form-data`. +Dans les spécifications OpenAPI 3.1, définissez un téléversement de fichier comme un schéma de type string avec un `contentMediaType` binaire. Le playground de l’API reconnaît le champ comme un sélecteur de fichier et l’envoie dans une requête `multipart/form-data`. -Utilisez cette configuration lorsqu’un endpoint accepte un fichier dans une requête multipart. Vous pouvez également utiliser `contentEncoding` pour décrire le codage du contenu du fichier. Une valeur `contentEncoding` sans `contentMediaType` binaire reste un champ texte. Pour les fichiers encodés en base64, définissez `contentEncoding` sur `base64` ou `base64url`. Le playground traite ces deux valeurs comme un fichier base64. Les autres valeurs, ou l’absence de valeur, utilisent le traitement des fichiers binaires. +Utilisez cette configuration lorsqu’un endpoint accepte un fichier dans une requête multipart. Vous pouvez également utiliser `contentEncoding` pour décrire le codage du contenu du fichier. Une valeur `contentEncoding` sans `contentMediaType` binaire reste un champ texte. Pour les fichiers encodés en base64, définissez `contentEncoding` sur `base64` ou `base64url`. Le playground traite ces deux valeurs comme un fichier base64. Pour les autres valeurs ou en l’absence de valeur, le playground utilise le traitement des fichiers binaires. ```json { @@ -120,7 +120,7 @@ Utilisez cette configuration lorsqu’un endpoint accepte un fichier dans une re } ``` -Vous pouvez utiliser des types MIME binaires tels que `application/octet-stream`, les images, l’audio, la vidéo, les PDF et les archives. Les types structurés tels que `application/json` ne sont pas traités comme des importations de fichiers. Les anciennes valeurs `format: "binary"` et `format: "base64"` restent prises en charge. +Vous pouvez utiliser des types MIME binaires tels que `application/octet-stream`, les images, l’audio, la vidéo, les PDF et les archives. Le playground de l’API ne traite pas les types structurés tels que `application/json` comme des téléversements de fichiers. Les anciennes valeurs `format: "binary"` et `format: "base64"` restent prises en charge.
### Spécifier l’authentification diff --git a/zh/api-playground/openapi-setup.mdx b/zh/api-playground/openapi-setup.mdx index ce75d15aa9..3efe450dba 100644 --- a/zh/api-playground/openapi-setup.mdx +++ b/zh/api-playground/openapi-setup.mdx @@ -1,6 +1,6 @@ --- title: "OpenAPI 设置" -description: "从 OpenAPI 3.0 和 3.1 规范文件生成交互式 API 文档,自动创建端点页面、请求构建器和导航结构,并支持身份验证、服务器 URL 与文件上传配置。" +description: "从 OpenAPI 3.0 和 3.1 规范文件生成交互式 API 文档,自动创建端点页面、请求构建器和导航结构,并配置身份验证、服务器 URL、请求参数与文件上传,帮助你快速发布完整且易于测试的 API 参考文档。了解如何设置规范文件、服务器地址、安全方案和文件字段。" keywords: ["OpenAPI", "API 规范", "Swagger"] --- @@ -90,7 +90,7 @@ API playground 会使用这些服务器 URL 来确定请求的发送目标。如 对于 OpenAPI 3.1 规范,请将文件上传定义为带有二进制 `contentMediaType` 的 string 类型 schema。API playground 会将该字段识别为文件选择器,并将其作为 `multipart/form-data` 请求的一部分发送。 -当端点在 multipart 请求中接收文件时,请使用此配置。你也可以使用 `contentEncoding` 描述文件内容的编码方式。没有二进制 `contentMediaType` 的 `contentEncoding` 值仍会被视为文本字段。对于使用 base64 编码的文件,请将 `contentEncoding` 设置为 `base64` 或 `base64url`。API playground 会将这两个值识别为 base64 文件。其他值或未设置值时,会按二进制文件处理。 +当端点在 multipart 请求中接收文件时,请使用此配置。你也可以使用 `contentEncoding` 描述文件内容的编码方式。没有二进制 `contentMediaType` 的 `contentEncoding` 值仍会被视为文本字段。对于使用 base64 编码的文件,请将 `contentEncoding` 设置为 `base64` 或 `base64url`。API playground 会将这两个值识别为 base64 文件。对于其他值或未设置值的情况,API playground 会按二进制方式处理文件。 ```json { @@ -120,7 +120,7 @@ API playground 会使用这些服务器 URL 来确定请求的发送目标。如 } ``` -你可以使用 `application/octet-stream`、图像、音频、视频、PDF 和归档文件等二进制媒体类型。`application/json` 等结构化媒体类型不会被视为文件上传。旧版 `format: "binary"` 和 `format: "base64"` 值仍受支持。 +你可以使用 `application/octet-stream`、图像、音频、视频、PDF 和归档文件等二进制媒体类型。API playground 不会将 `application/json` 等结构化媒体类型识别为文件上传。旧版 `format: "binary"` 和 `format: "base64"` 值仍受支持。
### 指定身份验证 From 9ac2a0da9f941e8cad6f1379dd951a523b4ab1d8 Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Mon, 10 Aug 2026 14:19:56 -0700 Subject: [PATCH 5/5] Apply suggestion from @ethanpalm --- api-playground/openapi-setup.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-playground/openapi-setup.mdx b/api-playground/openapi-setup.mdx index f3b70a8cf5..4045030e85 100644 --- a/api-playground/openapi-setup.mdx +++ b/api-playground/openapi-setup.mdx @@ -82,7 +82,7 @@ If your API has endpoints that exist at different URLs, you can [override the `s For OpenAPI 3.1 specifications, define a file upload as a string schema with a binary `contentMediaType`. The API playground recognizes the field as a file input and sends it as part of a `multipart/form-data` request. -Use this configuration when an endpoint accepts a file inside a multipart request. You can also use `contentEncoding` to describe how the file content is encoded. A `contentEncoding` value without a binary `contentMediaType` remains a text field. For base64-encoded files, set `contentEncoding` to `base64` or `base64url`. The API playground treats either value as a base64 file. For other values or no value, the API playground uses binary file handling. +Use this configuration when an endpoint accepts a file inside a multipart request. You can also use `contentEncoding` to describe how the file content encodes. A `contentEncoding` value without a binary `contentMediaType` remains a text field. For base64-encoded files, set `contentEncoding` to `base64` or `base64url`. The API playground treats either value as a base64 file. For other values or no value, the API playground uses binary file handling. ```json {