Skip to content

Commit 9780b5b

Browse files
add troubleshooting & resolution for openapi v2 (#283)
1 parent 119c6ff commit 9780b5b

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

api-playground/troubleshooting.mdx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: 'Troubleshooting'
3-
description: 'Common issues with API References'
4-
icon: 'triangle-exclamation'
2+
title: "Troubleshooting"
3+
description: "Common issues with API References"
4+
icon: "triangle-exclamation"
55
---
66

77
API pages are complicated. As a result, there are a lot of things that can go wrong.
@@ -24,13 +24,22 @@ Here's a list of common issues we've seen customers run into:
2424
If the text box that appears below has a green border, your document has passed validation.
2525
This is the exact validation package Mintlify uses to validate OpenAPI documents, so if your document
2626
passes validation here, there's a great chance the problem is elsewhere.
27+
28+
Additionally, Mintlify does not support OpenAPI 2.0. If your document uses this version of the specification,
29+
you could encounter this issue. You can convert your document at [editor.swagger.io](https://editor.swagger.io/) (under Edit > Convert to OpenAPI 3):
30+
31+
<Frame>
32+
<img src="/images/convert-oas-3.png" />
33+
</Frame>
34+
2735
</Accordion>
2836

2937
<Accordion title="One of my OpenAPI pages is completely blank">
3038
This is usually caused by a misspelled `openapi` field in the page metadata. Make sure
3139
the HTTP method and path match the HTTP method and path in the OpenAPI document exactly.
3240

3341
Here's an example of how things might go wrong:
42+
3443
```md get-user.mdx
3544
---
3645
openapi: "GET /users/{id}/"
@@ -40,8 +49,7 @@ openapi: "GET /users/{id}/"
4049
```yaml openapi.yaml
4150
paths:
4251
"/users/{id}":
43-
get:
44-
...
52+
get: ...
4553
```
4654
4755
Notice that the path in the `openapi` field has a trailing slash, whereas the path in the OpenAPI
@@ -56,6 +64,7 @@ paths:
5664
openapi: "v1 GET /users/{id}"
5765
---
5866
```
67+
5968
</Accordion>
6069

6170
<Accordion title="Requests from the API Playground don't work">
@@ -70,5 +79,6 @@ openapi: "v1 GET /users/{id}"
7079
setting in the `mint.json`, as described [here](/settings/global#api-configurations). This will
7180
likely require you to configure CORS on your server, as these requests will now come directly
7281
from your users' browsers.
82+
7383
</Accordion>
7484
</AccordionGroup>

images/convert-oas-3.png

159 KB
Loading

0 commit comments

Comments
 (0)