-
Notifications
You must be signed in to change notification settings - Fork 338
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
Fix/2005 handle exploded form query params #2288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a question about shell excaping
====server==== | ||
mock -p 4010 ${document} | ||
====command==== | ||
curl -i -X GET http://127.0.0.1:4010/recipes\?limit\=string\&offset\=string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why escaping here and not other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure... without the escaping, I wasn't getting both parameter validations, I was only getting offset. And this is how my terminal handled it when I pasted the url in there, and so I copied the escaping over and it got both validations to come across in the test 🤷♀️
I'm going to spend like 30 minutes trying to get the color around the object param values successfully. If it takes longer than that, I'm going to let it be. |
well that was easy c746bd2 😂 |
Addresses #2005
Summary
Handle exploded form query params for types:
Had to update the colorizer code to not attempt to add the prefix and postfix for objects, since that was what was breaking this in the first place.
Also updated the default for form query params to be exploded true to match the spec in the
createQueryUriTemplate
function.Matches what the spec says: https://spec.openapis.org/oas/v3.0.3#style-examples
Checklist
Screenshots
Non-Exploded form object param:
Exploded form object param:
Non-Exploded form array param:
Exploded form array param:
Non-Exploded form string param:
Exploded form string param: