Skip to content

Commit 9ab5492

Browse files
authored
add accordion group (#721)
1 parent 5fe421a commit 9ab5492

File tree

1 file changed

+96
-95
lines changed

1 file changed

+96
-95
lines changed

support.mdx

Lines changed: 96 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -32,101 +32,102 @@ export function openSearch(e) {
3232

3333
## Frequently Asked Questions
3434

35-
<Accordion title="GitHub app issues" icon="merge">
36-
The GitHub app can be temperamental and resetting the connection is a great way to solve issues.
37-
38-
<Steps>
39-
<Step title="Uninstall the Mintlify app through GitHub">
40-
1. In GitHub, go to [installations](https://github.com/settings/installations) and select **Configure** next to the Mintlify app. Scroll down and select **Uninstall**.
41-
2. Go to [Authorized GitHub Apps](https://github.com/settings/apps/authorizations) and select **Revoke** next to the Mintlify app.
42-
</Step>
43-
<Step title="Reinstall the Mintlify app">
44-
1. In your Mintlify dashboard, go to [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) and install the GitHub app.
45-
2. Authorize your account in the [My Profile](https://dashboard.mintlify.com/settings/account) section of your dashboard.
46-
</Step>
47-
</Steps>
48-
</Accordion>
49-
50-
<Accordion title="API page issues" icon="book-open">
51-
API pages are complicated. As a result, there are a lot of things that can go wrong. Here's a list of common issues we've seen customers run into:
52-
53-
<AccordionGroup>
54-
<Accordion title="All of my OpenAPI pages are completely blank">
55-
In this scenario, it's likely that either Mintlify cannot find your OpenAPI document or your OpenAPI document is invalid.
56-
57-
Running `mint dev` locally should reveal some of these issues.
58-
59-
To verify your OpenAPI document will pass validation:
60-
61-
1. Run `mint openapi-check <openapiFilenameOrUrl>` in your CLI.
62-
2. Validate your OpenAPI spec with [Swagger Editor](https://editor.swagger.io/).
63-
64-
Additionally, Mintlify does not support OpenAPI 2.0. If your document uses OpenAPI 2.0, you may encounter this issue. You can convert your document with [Swagger Editor](https://editor.swagger.io/).
65-
66-
<Frame>
67-
!["Convert to OpenAPI 3" menu item highlighted in the Swagger Editor](/images/convert-oas-3.png)
68-
</Frame>
69-
</Accordion>
70-
<Accordion title="One of my OpenAPI pages is completely blank">
71-
This is usually caused by a misspelled `openapi` field in the page metadata. Make sure that the HTTP method and path match the HTTP method and path in the OpenAPI document exactly.
72-
73-
Here's an example of how things might go wrong:
74-
75-
```md get-user.mdx
76-
---
77-
openapi: "GET /users/{id}/"
78-
---
79-
```
80-
81-
```yaml openapi.yaml
82-
paths:
83-
"/users/{id}":
84-
get: ...
85-
```
86-
Notice that the path in the `openapi` field has a trailing slash, whereas the path in the OpenAPI
87-
document does not.
88-
89-
Another common issue is a misspelled filename. If you are specifying a particular OpenAPI document
90-
in the `openapi` field, ensure the filename is correct. For example, if you have two OpenAPI
91-
documents `openapi/v1.json` and `openapi/v2.json`, your metadata might look like this:
92-
93-
```md api-reference/v1/users/get-user.mdx
94-
---
95-
openapi: "v1 GET /users/{id}"
96-
---
97-
```
98-
</Accordion>
99-
<Accordion title="Requests from the API Playground don't work">
100-
If you have a custom domain configured, this could be an issue with your reverse proxy. By
101-
default, requests made via the API Playground start with a `POST` request to the
102-
`/api/request` path on the docs site. If your reverse proxy is configured to only allow `GET`
103-
requests, then all of these requests will fail. To fix this, configure your reverse proxy to
104-
allow `POST` requests to the `/api/request` path.
105-
106-
Alternatively, if your reverse proxy prevents you from accepting `POST` requests, you can configure Mintlify to send requests directly to your backend with the `api.playground.proxy` setting in the `docs.json`. See the [configurations for the API playground](/settings#param-proxy) for more information. This will
107-
likely require you to configure CORS on your server, as these requests will now come directly
108-
from your users' browsers.
109-
</Accordion>
110-
</AccordionGroup>
111-
</Accordion>
112-
113-
<Accordion title="Docs page won't load (error 404)" icon="ban" iconType="regular">
114-
Check to see if you have `/api` in the URL. This is a reserved folder in production environments, which produces a 404 error.
115-
</Accordion>
116-
117-
118-
<Accordion title="Issues adding SVG to a card" icon="image">
119-
We support a specific type of SVG, called JSX, and as such the image will need to be converted.
120-
121-
1. Use the [SVGR converter](https://react-svgr.com/playground/) to generate JSX compatible SVG code.
122-
2. Copy the code inside the `<svg/>` tag.
123-
124-
![Output from the SVGR converter with the code inside <svg> and </svg> tags highlighted.](/images/svg-jsx.png)
125-
126-
3. Paste the code into your card. Make sure you only copy and paste the code inside the `<svg/>` tag.
127-
4. You may need to decrease the height and width to make the image fit.
128-
</Accordion>
129-
35+
<AccordionGroup>
36+
<Accordion title="GitHub app issues" icon="merge">
37+
The GitHub app can be temperamental and resetting the connection is a great way to solve issues.
38+
39+
<Steps>
40+
<Step title="Uninstall the Mintlify app through GitHub">
41+
1. In GitHub, go to [installations](https://github.com/settings/installations) and select **Configure** next to the Mintlify app. Scroll down and select **Uninstall**.
42+
2. Go to [Authorized GitHub Apps](https://github.com/settings/apps/authorizations) and select **Revoke** next to the Mintlify app.
43+
</Step>
44+
<Step title="Reinstall the Mintlify app">
45+
1. In your Mintlify dashboard, go to [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) and install the GitHub app.
46+
2. Authorize your account in the [My Profile](https://dashboard.mintlify.com/settings/account) section of your dashboard.
47+
</Step>
48+
</Steps>
49+
</Accordion>
50+
51+
<Accordion title="API page issues" icon="book-open">
52+
API pages are complicated. As a result, there are a lot of things that can go wrong. Here's a list of common issues we've seen customers run into:
53+
54+
<AccordionGroup>
55+
<Accordion title="All of my OpenAPI pages are completely blank">
56+
In this scenario, it's likely that either Mintlify cannot find your OpenAPI document or your OpenAPI document is invalid.
57+
58+
Running `mint dev` locally should reveal some of these issues.
59+
60+
To verify your OpenAPI document will pass validation:
61+
62+
1. Run `mint openapi-check <openapiFilenameOrUrl>` in your CLI.
63+
2. Validate your OpenAPI spec with [Swagger Editor](https://editor.swagger.io/).
64+
65+
Additionally, Mintlify does not support OpenAPI 2.0. If your document uses OpenAPI 2.0, you may encounter this issue. You can convert your document with [Swagger Editor](https://editor.swagger.io/).
66+
67+
<Frame>
68+
!["Convert to OpenAPI 3" menu item highlighted in the Swagger Editor](/images/convert-oas-3.png)
69+
</Frame>
70+
</Accordion>
71+
<Accordion title="One of my OpenAPI pages is completely blank">
72+
This is usually caused by a misspelled `openapi` field in the page metadata. Make sure that the HTTP method and path match the HTTP method and path in the OpenAPI document exactly.
73+
74+
Here's an example of how things might go wrong:
75+
76+
```md get-user.mdx
77+
---
78+
openapi: "GET /users/{id}/"
79+
---
80+
```
81+
82+
```yaml openapi.yaml
83+
paths:
84+
"/users/{id}":
85+
get: ...
86+
```
87+
Notice that the path in the `openapi` field has a trailing slash, whereas the path in the OpenAPI
88+
document does not.
89+
90+
Another common issue is a misspelled filename. If you are specifying a particular OpenAPI document
91+
in the `openapi` field, ensure the filename is correct. For example, if you have two OpenAPI
92+
documents `openapi/v1.json` and `openapi/v2.json`, your metadata might look like this:
93+
94+
```md api-reference/v1/users/get-user.mdx
95+
---
96+
openapi: "v1 GET /users/{id}"
97+
---
98+
```
99+
</Accordion>
100+
<Accordion title="Requests from the API Playground don't work">
101+
If you have a custom domain configured, this could be an issue with your reverse proxy. By
102+
default, requests made via the API Playground start with a `POST` request to the
103+
`/api/request` path on the docs site. If your reverse proxy is configured to only allow `GET`
104+
requests, then all of these requests will fail. To fix this, configure your reverse proxy to
105+
allow `POST` requests to the `/api/request` path.
106+
107+
Alternatively, if your reverse proxy prevents you from accepting `POST` requests, you can configure Mintlify to send requests directly to your backend with the `api.playground.proxy` setting in the `docs.json`. See the [configurations for the API playground](/settings#param-proxy) for more information. This will
108+
likely require you to configure CORS on your server, as these requests will now come directly
109+
from your users' browsers.
110+
</Accordion>
111+
</AccordionGroup>
112+
</Accordion>
113+
114+
<Accordion title="Docs page won't load (error 404)" icon="ban" iconType="regular">
115+
Check to see if you have `/api` in the URL. This is a reserved folder in production environments, which produces a 404 error.
116+
</Accordion>
117+
118+
119+
<Accordion title="Issues adding SVG to a card" icon="image">
120+
We support a specific type of SVG, called JSX, and as such the image will need to be converted.
121+
122+
1. Use the [SVGR converter](https://react-svgr.com/playground/) to generate JSX compatible SVG code.
123+
2. Copy the code inside the `<svg/>` tag.
124+
125+
![Output from the SVGR converter with the code inside <svg> and </svg> tags highlighted.](/images/svg-jsx.png)
126+
127+
3. Paste the code into your card. Make sure you only copy and paste the code inside the `<svg/>` tag.
128+
4. You may need to decrease the height and width to make the image fit.
129+
</Accordion>
130+
</AccordionGroup>
130131

131132
<Info>
132133
We do our best to respond to all requests within 24 hours but delays may occur during busy times.

0 commit comments

Comments
 (0)