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

### Specifying the URL for your API

To enable Mintlify features like the API playground, add a `servers` field to your OpenAPI document with your API's base URL.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L34

Did you really mean 'API's'?

```json
{
Expand Down Expand Up @@ -191,7 +191,7 @@

Selectively expose endpoints as Model Context Protocol (MCP) tools by using `x-mint: mcp`. Only enable endpoints that are safe for public access through AI tools.

<ResponseField name="mcp" type="object">

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L194

Did you really mean 'mcp'?
The MCP configuration for the endpoint.

<Expandable title="MCP">
Expand All @@ -208,7 +208,7 @@
</ResponseField>

<CodeGroup>
```json Selective enablement {6-10, 21} wrap
```json Selective enablement {6-9} wrap
{
"paths": {
"/users": {
Expand All @@ -233,7 +233,7 @@
}
```

```json Global enablement {3-5, 9-12} wrap
```json Global enablement {3-5, 9-13} wrap
{
"openapi": "3.1.0",
"x-mcp": {
Expand Down Expand Up @@ -368,7 +368,7 @@

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

```json {5, 12-13, 18, 20-21}
```json {3, 7-8, 11, 13-14}
{
"group": "API reference",
"openapi": "/path/to/openapi-v1.json",
Expand All @@ -386,7 +386,7 @@
]
}
]
},
}
```

#### Individual endpoints
Expand Down Expand Up @@ -460,10 +460,10 @@

### Autogenerate `MDX` files

Use our Mintlify [scraper](https://www.npmjs.com/package/@mintlify/scraping) to autogenerate `MDX` pages for large OpenAPI documents.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L463

Did you really mean 'autogenerate'?

<Note>
Your OpenAPI document must be valid or the files will not autogenerate.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L466

Did you really mean 'autogenerate'?
</Note>

The scraper generates:
Expand All @@ -475,12 +475,12 @@
<Steps>
<Step title="Generate `MDX` files.">
```bash
npx @mintlify/scraping@latest openapi-file <path-to-openapi-file>

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L478

Did you really mean 'npx'?
```
</Step>
<Step title="Specify an output folder.">
```bash
npx @mintlify/scraping@latest openapi-file <path-to-openapi-file> -o api-reference

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L483

Did you really mean 'npx'?
```

Add the `-o` flag to specify a folder to populate the files into. If a folder is not specified, the files will populate in the working directory.
Expand Down