diff --git a/api-playground/troubleshooting.mdx b/api-playground/troubleshooting.mdx index 93d32f21d..d80fa9a05 100644 --- a/api-playground/troubleshooting.mdx +++ b/api-playground/troubleshooting.mdx @@ -33,26 +33,14 @@ If your API pages aren't displaying correctly, check these common configuration This is usually caused by a misspelled `openapi` field in the page metadata. Make sure - the HTTP method and path match the HTTP method and path in the OpenAPI document exactly. + the HTTP method and path match the HTTP method and path in the OpenAPI document. - Here's an example of how things might go wrong: + + Mintlify tolerates trailing-slash mismatches. For example, `GET /users/{id}/` in your + metadata correctly resolves to `/users/{id}` in your OpenAPI spec, and vice versa. + - ```mdx get-user.mdx - --- - openapi: "GET /users/{id}/" - --- - ``` - - ```yaml openapi.yaml - paths: - "/users/{id}": - get: ... - ``` - - Notice that the path in the `openapi` field has a trailing slash, whereas the path in the OpenAPI - document does not. - - Another common issue is a misspelled filename. If you are specifying a particular OpenAPI document + A common issue is a misspelled filename. If you are specifying a particular OpenAPI document in the `openapi` field, ensure the filename is correct. For example, if you have two OpenAPI documents `openapi/v1.json` and `openapi/v2.json`, your metadata might look like this: diff --git a/es/api-playground/troubleshooting.mdx b/es/api-playground/troubleshooting.mdx index 996c00700..a73eb7496 100644 --- a/es/api-playground/troubleshooting.mdx +++ b/es/api-playground/troubleshooting.mdx @@ -34,23 +34,12 @@ Si sus páginas de la API no se muestran correctamente, revise estos problemas d Esto suele deberse a un campo `openapi` mal escrito en la metadata de la página. Asegúrate de que - el método HTTP y la ruta coincidan exactamente con el método HTTP y la ruta del documento de OpenAPI. + el método HTTP y la ruta coincidan con el método HTTP y la ruta del documento de OpenAPI. - Aquí tienes un ejemplo de cómo puede salir mal: - - ```mdx get-user.mdx - --- - openapi: "GET /users/{id}/" - --- - ``` - - ```yaml openapi.yaml - paths: - "/users/{id}": - get: ... - ``` - - Observa que la ruta en el campo `openapi` tiene una barra al final, mientras que la ruta en el documento de OpenAPI no la tiene. + + Mintlify tolera diferencias de barra diagonal al final. Por ejemplo, `GET /users/{id}/` en tu + metadata se resuelve correctamente a `/users/{id}` en tu especificación de OpenAPI, y viceversa. + Otro problema común es un nombre de archivo mal escrito. Si especificas un documento de OpenAPI en particular en el campo `openapi`, asegúrate de que el nombre del archivo sea correcto. Por ejemplo, si tienes dos documentos de OpenAPI `openapi/v1.json` y `openapi/v2.json`, tu metadata podría verse así: diff --git a/fr/api-playground/troubleshooting.mdx b/fr/api-playground/troubleshooting.mdx index f75cbedd8..a0a9b0ba6 100644 --- a/fr/api-playground/troubleshooting.mdx +++ b/fr/api-playground/troubleshooting.mdx @@ -33,23 +33,12 @@ Si vos pages API ne s’affichent pas correctement, consultez ces problèmes de - Ceci est généralement dû à une faute d’orthographe du champ `openapi` dans la metadata de la page. Assurez-vous que la méthode HTTP et le chemin correspondent exactement à la méthode HTTP et au chemin dans le document OpenAPI. + Ceci est généralement dû à une faute d’orthographe du champ `openapi` dans la metadata de la page. Assurez-vous que la méthode HTTP et le chemin correspondent à la méthode HTTP et au chemin dans le document OpenAPI. - Voici un exemple de la façon dont cela peut mal tourner : - - ```mdx get-user.mdx - --- - openapi: "GET /users/{id}/" - --- - ``` - - ```yaml openapi.yaml - paths: - "/users/{id}": - get: ... - ``` - - Notez que le chemin dans le champ `openapi` se termine par une barre oblique, alors que le chemin dans le document OpenAPI n’en a pas. + + Mintlify tolère les différences de barre oblique finale. Par exemple, `GET /users/{id}/` dans + vos metadata correspond correctement à `/users/{id}` dans votre spécification OpenAPI, et vice versa. + Un autre problème fréquent est une erreur dans le nom de fichier. Si vous indiquez un document OpenAPI précis dans le champ `openapi`, assurez-vous que le nom de fichier est correct. Par exemple, si vous avez deux documents OpenAPI `openapi/v1.json` et `openapi/v2.json`, vos metadata pourraient ressembler à ceci : diff --git a/zh/api-playground/troubleshooting.mdx b/zh/api-playground/troubleshooting.mdx index d3dfbaf51..ba5a42ee0 100644 --- a/zh/api-playground/troubleshooting.mdx +++ b/zh/api-playground/troubleshooting.mdx @@ -31,23 +31,12 @@ keywords: ["API 故障排查", "OpenAPI 无效", "配置问题"] 这通常是由于页面 metadata 中的 `openapi` 字段拼写错误导致的。请确保 - HTTP 方法和路径与 OpenAPI 文档中的 HTTP 方法和路径完全一致。 + HTTP 方法和路径与 OpenAPI 文档中的 HTTP 方法和路径一致。 - 下面是一个可能出错的示例: - - ```mdx get-user.mdx - --- - openapi: "GET /users/{id}/" - --- - ``` - - ```yaml openapi.yaml - paths: - "/users/{id}": - get: ... - ``` - - 请注意,`openapi` 字段中的路径以斜杠结尾,而 OpenAPI 文档中的路径没有。 + + Mintlify 可以容忍末尾斜杠的差异。例如,metadata 中的 `GET /users/{id}/` + 可以正确匹配 OpenAPI 规范中的 `/users/{id}`,反之亦然。 + 另一个常见问题是文件名拼写错误。如果你在 `openapi` 字段中指定了某个特定的 OpenAPI 文档,请确保文件名正确。例如,如果你有两个 OpenAPI 文档 `openapi/v1.json` 和 `openapi/v2.json`,你的 metadata 可能如下所示: