Skip to content

Commit cb18f28

Browse files
committed
initial draft
1 parent bdd82a3 commit cb18f28

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

fern/products/docs/pages/api-references/generate-webhook-ref.mdx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@ fern/
9999
└── generators.yml
100100
```
101101

102-
### Create individual documentation pages for each webhook event (OpenAPI)
102+
### Create individual documentation pages for each webhook event
103103

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
109-
110-
```yaml title="docs.yml"
111-
navigation:
112-
- subpackage_plants.newPlantWebhook
113-
```
104+
<Markdown src="/snippets/individual-pages-webhook.mdx">
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Reference individual webhook pages using the `subpackage_{api-name}.{webhook-name}`, where `api-name` is the name of the folder:
2+
- `{folder-name}` is the first tag (lowercase) from your webhook definition
3+
- `{webhook-event-name}` is the `operationId` from your webhook definition
4+
5+
```yaml title="docs.yml"
6+
navigation:
7+
- subpackage_plants.newPlantWebhook
8+
```
9+
10+
subpackage_webhooksv2_payInTransactionetc
11+
subpackage_{api_name}.operationID
12+
13+
operation id defines the webhook
14+
15+
payload name defines the webhook for fern definition
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
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)).
2+
3+
Then, reference individual webhook pages using the `subpackage_{tag}.{webhook-event-name}` format, where:
4+
- `{tag}` is the first tag (lowercase) from your webhook definition
5+
- `{webhook-event-name}` is the `operationId` from your webhook definition
6+
7+
```yaml title="docs.yml"
8+
navigation:
9+
- subpackage_plants.newPlantWebhook
10+
```

0 commit comments

Comments
 (0)