Wrong response using hyphen in query param & variable reference expression
See original GitHub issueHi, I’m facing a new issue when I use an hyphen in a query param and try to retrieve this value with variable reference expressions.
I have one operation like this : GET /users which can use query params like “id” or “account-name”.
I add two response examples in my openapi yaml file :
examples:
get-users-id-10:
value:
id: "{{request.params[id]}}"
accountName: "test"
get-users-account-name-test:
value:
id: "8"
accountName: "{{request.params[account-name]}}"
When I acces to http://localhost:8080/rest/Test/1.3.0/users?id=10 I get a correct response :
{"id":"10","accountName":"test"}
But when I try http://localhost:8080/rest/Test/1.3.0/users?account-name=test I do not retrieve my “account-name” param value as a string but get it as an object and I do not understand why.
{"id":"8","accountName":"{account-name=test}]}}"}
How can I get this kind of response ? :
{"id":"8","accountName":"test"}
Thanks
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Can hyphens be used in query string values? - Stack Overflow
I am parsing $_SERVER['QUERY_STRING'] with PHP. I would like to know whether it is syntactically correct to use hyphens in query string ......
Read more >Allowing hyphens in Query Params · Issue #460 · apiaryio/dredd
I have a query param that has a hyphen as the key. e.g. foo-bar, but dredd is throwing an error that it's invalid....
Read more >With respect to SEO, is it preferred to use hyphen instead of ...
Generally speaking, "hyphen" is prefered over "underscore" - I never had anyone use "periods" before, but for the sake of this question, ...
Read more >Dash (Hyphen) or Underscore in URLs: Which one to use and ...
Should you use a dash or an underscore in URLs? Well, the answer depends on a few things and is not that simple....
Read more >Amazon API Gateway important notes
API Gateway does not support sharing a custom domain name across REST and WebSocket APIs. Stage names can only contain alphanumeric characters, hyphens, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Done
Hope to release it within a week.