You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Need a new feature to send a query parameter without value #1396
This is the result of swagger forum discussion "Is there a way to specify query parameter without value?".
In summary, what needed is a method to specify whether to include a query parameter. If yes, then the resulting URL should look like "http://url/api?myParam".
This is related to the implementation for allowEmptyValue. However prior to implementing it, we need to clarify whether that sends an empty value (?param=) or just the parameter name (?param).
Is it possible to assume "param" ? If users really want "param=", that means there must be other values associated with param, so it is very unlikely that "param=" is a case ("param=undefined" may be). On the other hand, "param" is a very useful case for an action word without the need of any value at all.
This is not really a discussion for here, but rather for swagger-spec. I do have information about what we were trying to solve when adding it initially, and that's what we'll go with. I'll look into it in the upcoming days.
I'm closing this out as not supported by the spec. I'd suggest using a vendor extension to handle this, and keep a reference in the swagger-spec to your solution. That's how we're going to improve it.
Activity
webron commentedon Jun 21, 2015
This is related to the implementation for
allowEmptyValue. However prior to implementing it, we need to clarify whether that sends an empty value (?param=) or just the parameter name (?param).rick22sun commentedon Jun 21, 2015
I am looking for "?param" now, where "param" is sort of an action, such as "?deep_search".
webron commentedon Jun 21, 2015
I understand that, but we need to clarify the intention of the spec first.
rick22sun commentedon Jun 21, 2015
Agree, the spec does not distinguish the two cases, boolean allowEmptyValue seems not enough, one more value will make it more clear.
webron commentedon Jun 21, 2015
Right, but we can't change the spec right now, so we'll have to go with one or the other, and right now I can't say which.
rick22sun commentedon Jun 21, 2015
Is it possible to assume "param" ? If users really want "param=", that means there must be other values associated with param, so it is very unlikely that "param=" is a case ("param=undefined" may be). On the other hand, "param" is a very useful case for an action word without the need of any value at all.
webron commentedon Jun 21, 2015
This is not really a discussion for here, but rather for swagger-spec. I do have information about what we were trying to solve when adding it initially, and that's what we'll go with. I'll look into it in the upcoming days.
fehguy commentedon Dec 9, 2015
I'm closing this out as not supported by the spec. I'd suggest using a vendor extension to handle this, and keep a reference in the swagger-spec to your solution. That's how we're going to improve it.