diff --git a/api-playground/openapi/setup.mdx b/api-playground/openapi/setup.mdx index d5bfcf9da..93b47c02d 100644 --- a/api-playground/openapi/setup.mdx +++ b/api-playground/openapi/setup.mdx @@ -96,9 +96,12 @@ only one OpenAPI file - it will automatically detect your OpenAPI file.
- 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. ### Autogenerate files @@ -106,8 +109,11 @@ only one OpenAPI file - it will automatically detect your OpenAPI file. 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. + +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. + ```bash npx @mintlify/scraping@latest openapi-file