From 887ec38460aadfe4e5a47aba11ceb8031c08acce Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Thu, 9 Oct 2025 11:35:40 -0400 Subject: [PATCH 1/2] add name field for x-fern-examples --- .../api-def/openapi-pages/extensions/examples.mdx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fern/products/api-def/openapi-pages/extensions/examples.mdx b/fern/products/api-def/openapi-pages/extensions/examples.mdx index 53e178ad0..38f4aec6c 100644 --- a/fern/products/api-def/openapi-pages/extensions/examples.mdx +++ b/fern/products/api-def/openapi-pages/extensions/examples.mdx @@ -9,17 +9,21 @@ you want to show more than one example in your documentation. `x-fern-examples` is an array of examples. Each element of the array can contain `path-parameters`, `query-parameters`, `request` and `response` -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. +examples values that are all associated. Optionally, you can add a `name` field to provide a descriptive label for each example. + +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. ```yaml title="openapi.yml" {5-19} paths: /users/{userId}: get: x-fern-examples: - - headers: + - name: Headers example # Optional descriptive label + headers: custom_api_key: "capi_12345" # header defined using x-global-header extension userpool_id: "pool_67890" # header defined using x-global-header extension - - path-parameters: + - name: Get user 1234 + path-parameters: userId: user-1234 response: body: From 8047eb43a1c82c0b174bb67c9759bce377816adc Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Thu, 9 Oct 2025 11:43:14 -0400 Subject: [PATCH 2/2] update highlighting --- fern/products/api-def/openapi-pages/extensions/examples.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/products/api-def/openapi-pages/extensions/examples.mdx b/fern/products/api-def/openapi-pages/extensions/examples.mdx index 38f4aec6c..69bacbcd5 100644 --- a/fern/products/api-def/openapi-pages/extensions/examples.mdx +++ b/fern/products/api-def/openapi-pages/extensions/examples.mdx @@ -13,7 +13,7 @@ examples values that are all associated. Optionally, you can add a `name` field 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. -```yaml title="openapi.yml" {5-19} +```yaml title="openapi.yml" {4-21} paths: /users/{userId}: get: