Request + response examples
While OpenAPI has several fields for examples, there is no easy way to associate a request with a response. This is especially useful when 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, you must include the headers in your examples.
openapi.yml
Code samples
Fern generators automatically add SDK code samples. If you’d like to specify custom code samples for your example, use code-samples
.
openapi.yml