Skip to content
Closed
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
66 changes: 66 additions & 0 deletions api-playground/openapi-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

## Customize your endpoint pages

Customize your endpoint pages by adding the `x-mint` extension to your OpenAPI specification. The `x-mint` extension provides additional control over how your API documentation is generated and displayed.

Check warning on line 133 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L133

In general, use active voice instead of passive voice ('is generated').

### Metadata

Expand Down Expand Up @@ -208,7 +208,73 @@
}
```

### MCP

Control which API endpoints are exposed as tools in your [MCP server](/ai/model-context-protocol) using `x-mint: mcp`. By default, all endpoints are available as MCP tools. Use this extension to exclude endpoints or customize how they appear to AI applications.

Check warning on line 213 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L213

In general, use active voice instead of passive voice ('are exposed').

```json {8-12}
{
"paths": {
"/users": {
"get": {
"summary": "Get users",
"description": "Retrieve a list of users",
"x-mint": {
"mcp": {
"enabled": false
}
}
}
}
}
}
```

The `x-mint: mcp` extension supports these properties:

| Property | Type | Description |
| :------- | :--- | :---------- |
| `enabled` | `boolean` | Set to `false` to exclude this endpoint from your MCP server. Defaults to `true`. |
| `name` | `string` | Override the tool name that appears in AI applications. Defaults to the operation's `summary`. |
| `description` | `string` | Override the tool description. Defaults to the operation's `description`. |

This example excludes an internal endpoint and customizes another:

```json {8-10, 21-25}
{
"paths": {
"/internal/metrics": {
"get": {
"summary": "Get internal metrics",
"description": "Returns system metrics for monitoring",
"x-mint": {
"mcp": {
"enabled": false
}
}
}
},
"/users/search": {
"post": {
"summary": "Search users",
"description": "Search for users by various criteria",
"x-mint": {
"mcp": {
"name": "search_users",
"description": "Find users by name, email, or other attributes. Returns matching user profiles."
}
}
}
}
}
}
```

<Note>
The legacy `x-mcp` extension is still supported but deprecated. Use `x-mint: mcp` for new configurations.
</Note>

### Href

Check warning on line 277 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L277

'Href' should use sentence-style capitalization.

Check warning on line 277 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L277

Use 'href' instead of 'Href'.

Set the URL of the autogenerated endpoint page using `x-mint: href`. When `x-mint: href` is present, the generated API page uses the specified URL instead of the default autogenerated URL.

Expand Down Expand Up @@ -239,11 +305,11 @@

Add an `openapi` field to any navigation element in your `docs.json` to automatically generate pages for OpenAPI endpoints. You can control where these pages appear in your navigation structure, as dedicated API sections or with other pages.

The `openapi` field accepts either a file path in your docs repo or a URL to a hosted OpenAPI document.

Check warning on line 308 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L308

Use 'path' instead of 'file path'.

Generated endpoint pages have these default metadata values:

- `title`: The operation's `summary` field, if present. If there is no `summary`, the title is generated from the HTTP method and endpoint.

Check warning on line 312 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L312

In general, use active voice instead of passive voice ('is generated').
- `description`: The operation's `description` field, if present.
- `version`: The `version` value from the parent anchor or tab, if present.
- `deprecated`: The operation's `deprecated` field. If `true`, a deprecated label appears next to the endpoint title in the side navigation and on the endpoint page.
Expand All @@ -259,7 +325,7 @@

### Dedicated API sections

Generate dedicated API sections by adding an `openapi` field to a navigation element and no other pages. All endpoints in the specification are included.

Check warning on line 328 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L328

In general, use active voice instead of passive voice ('are included').

```json {5}
"navigation": {
Expand Down Expand Up @@ -301,7 +367,7 @@
```

<Note>
The `directory` field is optional and specifies where generated API pages are stored in your docs repo. If not specified, defaults to the `api-reference` directory of your repo.

Check warning on line 370 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L370

In general, use active voice instead of passive voice ('are stored').
</Note>

### Selective endpoints
Expand Down Expand Up @@ -340,7 +406,7 @@

#### OpenAPI spec inheritance

OpenAPI specifications are inherited down the navigation hierarchy. Child navigation elements inherit their parent's OpenAPI specification unless they define their own.

Check warning on line 409 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L409

In general, use active voice instead of passive voice ('are inherited').

```json {3, 7-8, 11, 13-14}
{
Expand All @@ -365,7 +431,7 @@

#### Individual endpoints

Reference specific endpoints without setting a default OpenAPI specification by including the file path. You can reference endpoints from multiple OpenAPI specifications in the same documentation section.

Check warning on line 434 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L434

Use 'path' instead of 'file path'.

```json {5-6}
"navigation": {
Expand Down Expand Up @@ -419,7 +485,7 @@

The method and path must exactly match your OpenAPI spec. If you have multiple OpenAPI specifications, include the path to the correct specification in your reference. You can also reference external OpenAPI URLs in `docs.json`.

#### Autogenerate endpoint pages

Check warning on line 488 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L488

Use 'autogenerat(e|ed|ing)?' instead of 'Autogenerate'.

To autogenerate MDX files from your OpenAPI specification, use the Mintlify [scraper](https://www.npmjs.com/package/@mintlify/scraping).

Expand Down Expand Up @@ -471,7 +537,7 @@

## Webhooks

Webhooks are HTTP callbacks that your API sends to notify external systems when events occur. Webhooks are supported in OpenAPI 3.1+ documents.

Check warning on line 540 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L540

In general, use active voice instead of passive voice ('are supported').

Add a `webhooks` field to your OpenAPI document alongside the `paths` field.

Expand Down