Skip to content
Merged
Changes from 2 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
17 changes: 12 additions & 5 deletions api-playground/openapi/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,25 @@
<br />

<Note>
The method and path must match the method and path specified in the OpenAPI
document exactly. If the endpoint doesn't exist in the OpenAPI file,
the page will be empty.
In most cases, the method and path must match the method and path specified
in the OpenAPI document exactly. If the endpoint doesn't exist in the OpenAPI
file, the page will be empty.

For webhooks, replace the method (i.e. "POST") with "webhook" (case insensitive)
and the correct method will be generated.
</Note>

### Autogenerate files

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

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

api-playground/openapi/setup.mdx#L107

Did you really mean 'Autogenerate'?

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.

Our Mintlify [scraper](https://www.npmjs.com/package/@mintlify/scraping)
autogenerates MDX files for your OpenAPI endpoints. Use the relative path to the
OpenAPI document in your codebase.
autogenerates MDX files for your OpenAPI endpoints.

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

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

api-playground/openapi/setup.mdx#L112

Did you really mean 'autogenerates'?

Each generated page will correspond to an OpenAPI operation under the "paths" section of the OpenAPI schema.
If your OpenAPI document is version 3.1+, the scraper will also generate pages for webhooks under the "webhooks" section of the OpenAPI schema.

Use the relative path to the OpenAPI document in your codebase.

```bash
npx @mintlify/scraping@latest openapi-file <path-to-openapi-file>
Expand All @@ -128,7 +135,7 @@
reorder and add the files to your navigation manually.

<Note>
If your OpenAPI document is invalid, the files will not autogenerate.

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

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

api-playground/openapi/setup.mdx#L138

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


Expand Down