diff --git a/fern/products/api-def/openapi-pages/extensions/examples.mdx b/fern/products/api-def/openapi-pages/extensions/examples.mdx index 53e178ad0..69bacbcd5 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. -```yaml title="openapi.yml" {5-19} +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" {4-21} 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: