Skip to content
Merged
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: 15 additions & 9 deletions api-playground/mdx/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ description: "You can set authentication parameters to let users use their real

## Enabling Authentication

You can add an authentication method to your mint.json to enable it on every page or you can set it on a per-page basis.
You can add an authentication method to your docs.json to enable it on every page or you can set it on a per-page basis.

The page's authentication method will override mint.json if both are set.
The page's authentication method will override docs.json if both are set.

### Bearer Token

<CodeGroup>

```json mint.json
```json docs.json
"api": {
"auth": {
"mdx": {
"auth": {
"method": "bearer"
}
}
}
```
Expand All @@ -34,10 +36,12 @@ authMethod: "bearer"

<CodeGroup>

```json mint.json
```json docs.json
"api": {
"auth": {
"mdx": {
"auth": {
"method": "basic"
}
}
}
```
Expand All @@ -55,11 +59,13 @@ authMethod: "basic"

<CodeGroup>

```json mint.json
```json docs.json
"api": {
"auth": {
"mdx": {
"auth": {
"method": "key",
"name": "x-api-key"
}
}
}
```
Expand All @@ -75,7 +81,7 @@ authMethod: "key"

### None

The "none" authentication method is useful to disable authentication on a specific endpoint after setting a default in mint.json.
The "none" authentication method is useful to disable authentication on a specific endpoint after setting a default in docs.json.

<CodeGroup>
```md Page Metadata
Expand Down
27 changes: 13 additions & 14 deletions api-playground/mdx/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ title: 'MDX Setup'
description: 'Generate docs pages for your API endpoints using MDX'
---

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.
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.

<Steps>
<Step title="Configure your API">
In your `mint.json` file, define your base URL and auth method:
In your `docs.json` file, define your base URL and auth method:

```json
{
"api": {
"baseUrl": "https://mintlify.com/api", // string array for multiple base URLs
"api": {
"mdx": {
"server": "https://mintlify.com/api", // string array for multiple base URLs
"auth": {
"method": "bearer" // options: bearer, basic, key.
"method": "key",
"name": "x-api-key" // options: bearer, basic, key.
}
}
}
Expand All @@ -23,16 +24,14 @@ Mintlify allows you to define your API endpoints using a combination of `mint.js
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:

```json
{
"api": {
"playground": {
"mode": "hide"
}
"api": {
"playground": {
"display": "none"
}
}
```

Find a full list of API configurations [here](/settings/global#api-configurations).
Find a full list of API configurations [here](/settings/global#param-api).
</Step>

<Step title="Create your endpoint pages">
Expand All @@ -54,12 +53,12 @@ Mintlify allows you to define your API endpoints using a combination of `mint.js

<Note>

If you have `baseUrl` configured in [mint.json](/settings/global), you can use relative paths like `/v1/endpoint`.
If you have `server` configured in [docs.json](/settings/global), you can use relative paths like `/v1/endpoint`.

</Note>
</Step>

<Step title="Add your endpoints to your docs">
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).
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).
</Step>
</Steps>
2 changes: 1 addition & 1 deletion api-playground/openapi/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ follow OpenAPI specification 3.0+.

## Auto-populate API pages

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.
The fastest way to get started with OpenAPI is to add an `openapi` field to a tab or anchor 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/anchor.

**Example with Anchors:**

Expand Down
2 changes: 1 addition & 1 deletion api-playground/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ openapi: "v1 GET /users/{id}"

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.disableProxy`
setting in the `mint.json`, as described [here](/settings/global#api-configurations). This will
setting in the `docs.json`, as described [here](/settings/global#api-configurations). This will
likely require you to configure CORS on your server, as these requests will now come directly
from your users' browsers.

Expand Down
2 changes: 1 addition & 1 deletion development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ description: 'Preview changes locally to update your docs'

</CodeGroup>

**Step 2**: Navigate to the docs directory (where the `mint.json` file is located) and execute the following command:
**Step 2**: Navigate to the docs directory (where the `docs.json` file is located) and execute the following command:

```bash
mintlify dev
Expand Down
8 changes: 4 additions & 4 deletions integrations/analytics/amplitude.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
title: "Amplitude"
---

Add the following to your `mint.json` file to send analytics to Amplitude.
Add the following to your `docs.json` file to send analytics to Amplitude.

<CodeGroup>

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
"integrations": {
"amplitude": {
"apiKey": "required"
}
}
```

```json Example
"analytics": {
"integrations": {
"amplitude": {
"apiKey": "76bb138bf3fbf58186XXX00000"
}
Expand Down
8 changes: 4 additions & 4 deletions integrations/analytics/clearbit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
title: "Clearbit"
---

Add the following to your `mint.json` file to send analytics to Clearbit.
Add the following to your `docs.json` file to send analytics to Clearbit.

<CodeGroup>

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"clearbit": {
"publicApiKey": "required"
}
}
```

```json Example
"analytics": {
integrations: {
"clearbit": {
"publicApiKey": "pk_1a1882"
}
Expand Down
8 changes: 4 additions & 4 deletions integrations/analytics/fathom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
title: "Fathom"
---

Add the following to your `mint.json` file to send analytics to Fathom.
Add the following to your `docs.json` file to send analytics to Fathom.

You can get the `siteId` from your script settings.

<CodeGroup>

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"fathom": {
"siteId": "required"
}
}
```

```json Example
"analytics": {
integrations: {
"fathom": {
"siteId": "YSVMSDAY"
}
Expand Down
8 changes: 4 additions & 4 deletions integrations/analytics/google-analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Create a Web Stream and put the URL of your Mintlify docs site as the stream URL

Your Measurement ID looks like `G-XXXXXXX` and will show up under Stream Details immediately after you create the Web Stream.

### Put Measurement ID in mint.json
### Put Measurement ID in docs.json

Add your Measurement ID to your `mint.json` file like so:
Add your Measurement ID to your `docs.json` file like so:

```json mint.json
"analytics": {
```json docs.json
integrations: {
"ga4": {
"measurementId": "G-XXXXXXX"
}
Expand Down
8 changes: 4 additions & 4 deletions integrations/analytics/google-tag-manager.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
title: "Google Tag Manager"
---

Add your tag ID to `mint.json` file and we'll inject the Google Tag Manager script to all your pages.
Add your tag ID to `docs.json` file and we'll inject the Google Tag Manager script to all your pages.

You are responsible for setting up cookie consent banners with Google Tag Manager if you need them.

<CodeGroup>

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"gtm": {
"tagId": "required"
}
}
```

```json Example
"analytics": {
integrations: {
"gtm": {
"tagId": "GTM-MGBL4PW"
}
Expand Down
8 changes: 4 additions & 4 deletions integrations/analytics/heap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
title: "Heap"
---

Add the following to your `mint.json` file to send analytics to Heap.
Add the following to your `docs.json` file to send analytics to Heap.

<CodeGroup>

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"heap": {
"appId": "required"
}
}
```

```json Example
"analytics": {
integrations: {
"heap": {
"appId": "1234567890"
}
Expand Down
6 changes: 3 additions & 3 deletions integrations/analytics/hotjar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: "HotJar"
---

Add the following to your `mint.json` file to send analytics to HotJar.
Add the following to your `docs.json` file to send analytics to HotJar.

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"hotjar": {
"hjid": "required",
"hjsv": "required"
Expand Down
8 changes: 4 additions & 4 deletions integrations/analytics/koala.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
title: "Koala"
---

Add the following to your `mint.json` file to send analytics to Koala.
Add the following to your `docs.json` file to send analytics to Koala.

<CodeGroup>

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"koala": {
"publicApiKey": "required"
}
}
```

```json Example
"analytics": {
integrations: {
"koala": {
"publicApiKey": "pk_1a1882"
}
Expand Down
6 changes: 3 additions & 3 deletions integrations/analytics/logrocket.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: "LogRocket"
---

Add the following to your `mint.json` file to send analytics to LogRocket.
Add the following to your `docs.json` file to send analytics to LogRocket.

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"logrocket": {
"apiKey": "required"
}
Expand Down
6 changes: 3 additions & 3 deletions integrations/analytics/mixpanel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: "Mixpanel"
---

Add the following to your `mint.json` file to send analytics to Mixpanel.
Add the following to your `docs.json` file to send analytics to Mixpanel.

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"mixpanel": {
"projectToken": "required"
}
Expand Down
10 changes: 5 additions & 5 deletions integrations/analytics/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -506,14 +506,14 @@ className="h-6 w-6"

## Enabling Analytics

Set your analytics keys in `mint.json`. You can add an unlimited number of analytics integrations for free.
Set your analytics keys in `docs.json`. You can add an unlimited number of analytics integrations for free.

The syntax for `mint.json` is below. You only need to include entries for the platforms you want to connect.
The syntax for `docs.json` is below. You only need to include entries for the platforms you want to connect.

<CodeGroup>

```json Analytics options in mint.json
"analytics": {
```json Analytics options in docs.json
integrations: {
"amplitude": {
"apiKey": "required"
},
Expand Down Expand Up @@ -556,7 +556,7 @@ The syntax for `mint.json` is below. You only need to include entries for the pl
```

```json Google Analytics 4 Example
"analytics": {
integrations: {
"ga4": {
"measurementId": "G-XXXXXXX"
}
Expand Down
Loading