Skip to content

Commit 1853b0d

Browse files
lawrekahahnbeelee
andauthored
Update docs for webhooks (#551)
* update mdx docs * add section to autogeneration docs * Update api-playground/openapi/setup.mdx Co-authored-by: Hahnbee Lee <[email protected]> --------- Co-authored-by: Hahnbee Lee <[email protected]>
1 parent 48c6488 commit 1853b0d

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

api-playground/openapi/setup.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,24 @@ only one OpenAPI file - it will automatically detect your OpenAPI file.
9696
<br />
9797

9898
<Note>
99-
The method and path must match the method and path specified in the OpenAPI
100-
document exactly. If the endpoint doesn't exist in the OpenAPI file,
101-
the page will be empty.
99+
In most cases, the method and path must match the method and path specified
100+
in the OpenAPI document exactly. If the endpoint doesn't exist in the OpenAPI
101+
file, the page will be empty.
102+
103+
For webhooks, replace the method (i.e. "POST") with "webhook" (case insensitive)
104+
and the correct method will be generated.
102105
</Note>
103106

104107
### Autogenerate files
105108

106109
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.
107110

108111
Our Mintlify [scraper](https://www.npmjs.com/package/@mintlify/scraping)
109-
autogenerates MDX files for your OpenAPI endpoints. Use the relative path to the
110-
OpenAPI document in your codebase.
112+
autogenerates MDX files for your OpenAPI endpoints.
113+
114+
Each generated page will correspond to an OpenAPI operation under the "paths" section of the OpenAPI schema.
115+
If your OpenAPI document is version 3.1+, the scraper will also generate pages for webhooks under the "webhooks" section of the OpenAPI schema.
116+
111117

112118
```bash
113119
npx @mintlify/scraping@latest openapi-file <path-to-openapi-file>

0 commit comments

Comments
 (0)