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/extensions/examples.mdx
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,17 +9,21 @@ you want to show more than one example in your documentation.
9
9
10
10
`x-fern-examples` is an array of examples. Each element of the array
11
11
can contain `path-parameters`, `query-parameters`, `request` and `response`
12
-
examples values that are all associated. If you [defined global headers via the `x-fern-global-headers` extension](/api-definitions/openapi/extensions/global-headers), you must include the headers in your examples.
12
+
examples values that are all associated. Optionally, you can add a `name` field to provide a descriptive label for each example.
13
13
14
-
```yaml title="openapi.yml" {5-19}
14
+
If you [defined global headers via the `x-fern-global-headers` extension](/api-definitions/openapi/extensions/global-headers), you must include the headers in your examples.
15
+
16
+
```yaml title="openapi.yml" {4-21}
15
17
paths:
16
18
/users/{userId}:
17
19
get:
18
20
x-fern-examples:
19
-
- headers:
21
+
- name: Headers example # Optional descriptive label
22
+
headers:
20
23
custom_api_key: "capi_12345"# header defined using x-global-header extension
21
24
userpool_id: "pool_67890"# header defined using x-global-header extension
0 commit comments