You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/api-def/openapi-pages/webhooks.mdx
+61-7Lines changed: 61 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,17 +12,60 @@ Fern supports two methods for defining webhooks in your OpenAPI specification:
12
12
13
13
For OpenAPI 3.1 specifications, use the `webhooks` top-level field to define your webhook operations. Each webhook requires an `operationId` to be properly processed by Fern.
14
14
15
-
```yaml openapi.yml {4}
15
+
To create dedicated pages in your API reference documentation for each webhook
16
+
event, include `tags` and complete `example` data in your schema. Then, [add a
Copy file name to clipboardExpand all lines: fern/products/docs/pages/api-references/generate-webhook-ref.mdx
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,3 +98,16 @@ fern/
98
98
│ └── openapi.yml # Order webhook OpenAPI spec
99
99
└── generators.yml
100
100
```
101
+
102
+
### Create individual documentation pages for each webhook event (OpenAPI)
103
+
104
+
To display each webhook event as an individual page with rich examples, you need to define `tags` and `example`[in your webhook specification](/api-definitions/openapi/endpoints/webhooks) (or [overrides file](/api-definitions/overview/overrides)).
105
+
106
+
Then, reference individual webhook pages using the `subpackage_{tag}.{webhook-event-name}` format, where:
107
+
-`{tag}` is the first tag (lowercase) from your webhook definition
108
+
-`{webhook-event-name}` is the `operationId` from your webhook definition
0 commit comments