-
Notifications
You must be signed in to change notification settings - Fork 854
OpenAPI Examples are not respected in generated documentation #9168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, @mahirk Thanks for highlighting this behavior. I suppose you want to generate the
We will be happy if this resolves your issue. Feel free to raise concerns otherwise. |
Hey @abhinaba-ghosh parameters:
- name: someOtherString
in: path
description: property-two-examples description
required: true
schema:
type: string
examples:
property-example-one:
value: stringOne
property-example-two:
value: stringTwo
- name: someString
in: header
description: Header for XYZ ABC Purposes
required: true
schema:
type: string
examples:
property-example-one:
value: VALUE X This is a valid mechanism for defining an example as well per the OpenAPI Documentation: Would there be a way to access those example properties to match the full spec? Is there something incorrect with the above openAPI spec? I believe it has been validated correctly as well. |
This is a complicated part of the spec, for sure. This will also need consideration when we move to support OAS 3.1.x. See discussion here: OAI/OpenAPI-Specification#2336 (comment) |
Hey @vvs11 / @abhinaba-ghosh was just wondering if there was any update here? |
@vvs11 / @abhinaba-ghosh Checking in :) |
@mahirk No updates yet. Will get back to you on this as soon as there's an update |
Heads up, examples in OpenAPI are bonkers and there's a lot of similar but different approaches. https://phil.tech/2020/openapi-examples/ |
Describe the bug
Postman API to Collection generation does not support examples in the objects. The strategies are described here: https://swagger.io/docs/specification/adding-examples/
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The examples request and response should use the example values provided in the specification.
Screenshots

App information (please complete the following information):
App Type: Chrome App
Postman Version: Latest on browser
OS: [e.g. macOS Mojave 10.14.6]
The text was updated successfully, but these errors were encountered: