-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Response examples should respect media-type #6456
Conversation
@mathis-m looks like linting errors that fail CI |
@tim-lai gonna fix that in some hours |
My approach is to override the response schema's example in case there is a matching media type example defined. |
still failing CI. this time in |
should pass json instead of map upsi fixes ci
fixed. |
In case of xml this will not work as described in #6470 |
Description
Response examples do not respect the media type selected.
It just stringifies the json representation of the sample provided via
examples
orexample
keyword.It should use the
getSampleSchema
method, which does take care of the content-type // media-type.Motivation and Context
Fixes #6442
How Has This Been Tested?
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests