You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: advanced/rest-api/overview.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,24 +19,24 @@ associated with the entire org and can be used across multiple deployments.
19
19
<imgsrc="/images/external-api-key.png" />
20
20
</Frame>
21
21
22
-
## Discovery API
22
+
## Chat API
23
23
24
-
The Discovery API allows you to embed an AI chat experience grounded in your docs and continually kept up to date into any application of your choosing.
24
+
The Chat API allows you to embed an AI chat experience grounded in your docs and continually kept up to date into any application of your choosing.
25
25
Responses include citations so you can point your users to the right places they need to get help.
26
26
27
27
## Getting Started
28
28
29
-
To get started, you'll need to generate a Discovery API key in the [dashboard](https://dashboard.mintlify.com/products/chat/widget):
29
+
To get started, you'll need to generate a Chat API key in the [dashboard](https://dashboard.mintlify.com/products/chat/widget):
30
30
31
31
<Frame>
32
32
<img
33
-
alt="Create a Discovery API key"
33
+
alt="Create a Chat API key"
34
34
src="/images/generate-discovery-api-key.png"
35
35
/>
36
36
</Frame>
37
37
38
38
<Note>
39
-
The Discovery API token is a public token that can be referenced in your
39
+
The Chat API token is a public token that can be referenced in your
40
40
frontend code whereas the API key is a server-side token that should be kept
Copy file name to clipboardExpand all lines: api-playground/mdx/configuration.mdx
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,19 @@ title: 'MDX Setup'
3
3
description: 'Generate docs pages for your API endpoints using MDX'
4
4
---
5
5
6
-
Mintlify allows you to define your API endpoints using a combination of `mint.json` configuration, MDX metadata fields, and the `<ParamFields />` component. From the defined endpoints, we generate an API playground, request examples, and response examples.
6
+
Mintlify allows you to define your API endpoints using a combination of `docs.json` configuration, MDX metadata fields, and the `<ParamFields />` component. From the defined endpoints, we generate an API playground, request examples, and response examples.
7
7
8
8
<Steps>
9
9
<Steptitle="Configure your API">
10
-
In your `mint.json` file, define your base URL and auth method:
10
+
In your `docs.json` file, define your base URL and auth method:
11
11
12
12
```json
13
-
{
14
-
"api": {
15
-
"baseUrl": "https://mintlify.com/api", // string array for multiple base URLs
13
+
"api": {
14
+
"mdx": {
15
+
"server": "https://mintlify.com/api", // string array for multiple base URLs
@@ -23,16 +24,14 @@ Mintlify allows you to define your API endpoints using a combination of `mint.js
23
24
If you would not like to show an API playground, you don't need to include auth types. Hide the playground with the following field:
24
25
25
26
```json
26
-
{
27
-
"api": {
28
-
"playground": {
29
-
"mode": "hide"
30
-
}
27
+
"api": {
28
+
"playground": {
29
+
"display": "none"
31
30
}
32
31
}
33
32
```
34
33
35
-
Find a full list of API configurations [here](/settings/global#api-configurations).
34
+
Find a full list of API configurations [here](/settings/global#param-api).
36
35
</Step>
37
36
38
37
<Steptitle="Create your endpoint pages">
@@ -54,12 +53,12 @@ Mintlify allows you to define your API endpoints using a combination of `mint.js
54
53
55
54
<Note>
56
55
57
-
If you have `baseUrl` configured in [mint.json](/settings/global), you can use relative paths like `/v1/endpoint`.
56
+
If you have `server` configured in [docs.json](/settings/global), you can use relative paths like `/v1/endpoint`.
58
57
59
58
</Note>
60
59
</Step>
61
60
62
61
<Steptitle="Add your endpoints to your docs">
63
-
Add your endpoint pages to the sidebar by adding the paths to the `navigation` field in your `mint.json`. Learn more about structuring your docs [here](/settings/navigation).
62
+
Add your endpoint pages to the sidebar by adding the paths to the `navigation` field in your `docs.json`. Learn more about structuring your docs [here](/settings/navigation).
Copy file name to clipboardExpand all lines: api-playground/openapi/setup.mdx
+56-55Lines changed: 56 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,48 +8,47 @@ description: "Reference OpenAPI endpoints in your docs pages"
8
8
To describe your endpoints with OpenAPI, make sure you have a valid OpenAPI
9
9
document in either JSON or YAML format that follows the
10
10
[OpenAPI specification](https://swagger.io/specification/). Your document must
11
-
follow OpenAPI specification 3.0+.
11
+
follow OpenAPI specification 3.0+.
12
+
<Tip>To validate your OpenAPI spec, use our [CLI](https://www.npmjs.com/package/mintlify) and run this command: <br/>`mintlify openapi-check <openapiFilenameOrUrl>`</Tip>
12
13
13
14
## Auto-populate API pages
14
15
15
-
The fastest way to get started with OpenAPI is to add an `openapi` field to a tab or anchor in the `mint.json`. This field can contain either the path to an OpenAPI document in your docs repo, or the URL of a hosted OpenAPI document. Mintlify will automatically generate a page for each OpenAPI operation and place them in the tab/anchor.
16
+
The fastest way to get started with OpenAPI is to add an `openapi` field to a tab in the `docs.json`. This field can contain either the path to an OpenAPI document in your docs repo, or the URL of a hosted OpenAPI document. Mintlify will automatically generate a page for each OpenAPI operation and place them in the tab.
<Tip>To validate your OpenAPI spec, you can use this command: <br/>`mintlify openapi-check <openapiFilenameOrUrl>`</Tip>
51
-
52
-
53
52
When using this option, the metadata for the generated pages will have the following default values:
54
53
55
54
*`title`: The `summary` field from the OpenAPI operation, if present. Otherwise a title generated from the HTTP method and endpoint.
@@ -62,39 +61,9 @@ There are some scenarios in which the default behavior isn't sufficient. If you
62
61
63
62
## Create MDX files for API pages
64
63
65
-
If you want to customize the page metadata, add additional content, omit certain OpenAPI operations, or reorder OpenAPI pages in your navigation, you'll need an MDX page for each operation. Here is [an example MDX OpenAPI page](https://github.com/elevenlabs/elevenlabs-docs/blob/e5e267c97b8d1e4c21db1dcdb8b005eb1dfed7da/api-reference/speech-to-speech.mdx?plain=1#L2) from [Elevenlabs](https://elevenlabs.io/docs/api-reference/speech-to-speech). 
For large OpenAPI documents, creating one MDX page for each OpenAPI operation can be a lot of work. To make it easier, we created a local OpenAPI page scraper.
Learn more about our scraping package [here](https://www.npmjs.com/package/@mintlify/scraping).
89
-
90
-
The scraper will output an array of
91
-
[Navigation entries](/settings/global#structure) containing your OpenAPI MDX
92
-
files. You can either append these entries to your existing Navigation, or
93
-
reorder and add the files to your navigation manually.
64
+
If you want to customize the page metadata, add additional content, omit certain OpenAPI operations, or reorder OpenAPI pages in your navigation, you'll need an MDX page for each operation. Here is [an example MDX OpenAPI page](https://github.com/mindsdb/mindsdb/blob/main/docs/rest/databases/create-databases.mdx) from [MindsDB](https://docs.mindsdb.com/rest/databases/create-databases). 
94
65
95
-
<Note>
96
-
If your OpenAPI document is invalid, the files will not autogenerate.
97
-
</Note>
66
+

98
67
99
68
### Manually specify files
100
69
@@ -132,6 +101,38 @@ only one OpenAPI file - it will automatically detect your OpenAPI file.
132
101
the page will be empty.
133
102
</Note>
134
103
104
+
### Autogenerate files
105
+
106
+
For large OpenAPI documents, creating one MDX page for each OpenAPI operation can be a lot of work. To make it easier, we created a local OpenAPI page scraper.
0 commit comments