diff --git a/api-playground/troubleshooting.mdx b/api-playground/troubleshooting.mdx index 93d32f21d..6c4d2b6db 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: + + Trailing slashes are handled automatically. For example, `GET /users/{id}/` in your + metadata will correctly match a `/users/{id}` path in the 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: