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
it should not unnecessarily stringify string values for text/plain content type #6431
Conversation
The logic should probably be changed to apply JSON.stringify specifically to JSON media types ( |
The json sample generation is the default case. |
@hkosova do you think it is better to use the old behavior(only stringify object values) before #6412 was merged as default sample case and introduce case for json content type where sting values will be stringified as well? |
@mathis-m I this suggestion is better. Revert to original behavior to only stringify object values, but add a function for an |
@tim-lai thanks for your input. Will implement this in the next days. |
…gified for default content type. introduced json case where string is stringified too
@tim-lai could you review the changes made. |
Description
Sample for text/plain should not be stringified. Introduced with #6412 the json sample for type string will be stringified. This should only be the case if the content type is not text/plain.
Motivation and Context
Fixes #6430
How Has This Been Tested?
in browser
by new tests
Screenshots (if appropriate):
see #6430
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests