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
6 changes: 4 additions & 2 deletions api-playground/openapi/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
}
```

<Note>The directory field is optional. If not specified, the files will be placed in the **api-reference** folder of the docs repo.</Note>

When using this option, the metadata for the generated pages will have the following default values:

* `title`: The `summary` field from the OpenAPI operation, if present. Otherwise a title generated from the HTTP method and endpoint.
Expand Down Expand Up @@ -77,6 +79,8 @@
If you have multiple OpenAPI files, include the path to the OpenAPI file to ensure Mintlify finds the correct OpenAPI document. This is not required if you have
only one OpenAPI file - it will automatically detect your OpenAPI file.

If you want to reference an external OpenAPI file using this method, provide the file’s URL in the docs.json. See [here](https://mintlify.com/docs/settings/global#param-source-4) for the correct format.

<CodeGroup>
```md Example
---
Expand All @@ -93,8 +97,6 @@
```
</CodeGroup>

<br />

<Note>
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
Expand All @@ -104,12 +106,12 @@
and the correct method will be generated.
</Note>

### Autogenerate files

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

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

api-playground/openapi/setup.mdx#L109

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.

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

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

api-playground/openapi/setup.mdx#L114

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.
Expand All @@ -134,7 +136,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 139 in api-playground/openapi/setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

api-playground/openapi/setup.mdx#L139

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


Expand Down
2 changes: 1 addition & 1 deletion api-playground/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Here's a list of common issues we've seen customers run into:

To verify your OpenAPI document will pass validation:

1. Visit [this validator](https://apitools.dev/swagger-parser/online/)
1. Visit [this validator](https://editor.swagger.io/)
2. Switch to the "Validate text" tab
3. Paste in your OpenAPI document
4. Click "Validate it!"
Expand Down