Skip to content
Closed
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
24 changes: 6 additions & 18 deletions api-playground/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,14 @@ If your API pages aren't displaying correctly, check these common configuration
</Accordion>
<Accordion title="One of my OpenAPI pages is completely blank">
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:
<Note>
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.
</Note>

```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:

Expand Down
21 changes: 5 additions & 16 deletions es/api-playground/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,12 @@ Si sus páginas de la API no se muestran correctamente, revise estos problemas d

<Accordion title="Una de mis páginas de OpenAPI está completamente en blanco">
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.
<Note>
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.
</Note>

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í:

Expand Down
21 changes: 5 additions & 16 deletions fr/api-playground/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,12 @@ Si vos pages API ne s’affichent pas correctement, consultez ces problèmes de
</Accordion>

<Accordion title="L’une de mes pages OpenAPI s’affiche complètement vide">
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.
<Note>
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.
</Note>

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 :

Expand Down
21 changes: 5 additions & 16 deletions zh/api-playground/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,12 @@ keywords: ["API 故障排查", "OpenAPI 无效", "配置问题"]

<Accordion title="我的某个 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 文档中的路径没有。
<Note>
Mintlify 可以容忍末尾斜杠的差异。例如,metadata 中的 `GET /users/{id}/`
可以正确匹配 OpenAPI 规范中的 `/users/{id}`,反之亦然。
</Note>

另一个常见问题是文件名拼写错误。如果你在 `openapi` 字段中指定了某个特定的 OpenAPI 文档,请确保文件名正确。例如,如果你有两个 OpenAPI 文档 `openapi/v1.json` 和 `openapi/v2.json`,你的 metadata 可能如下所示:

Expand Down
Loading