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
The only way I can make the list parameter work as expected is by wrapping it in [] braces:
curl -v 'http://localhost:8080/test?ids=\[1,2\]'
Other list types like the ones specified in https://www.rfc-editor.org/rfc/rfc6570#section-3.2.9 or the commonly used param[]= style either don't pass the validation, raise an error or don't parse the list as expected
curl -v 'http://localhost:8080/test?ids=1,2'# => Exception Unable to parse JSON - Unexpected character (',' (code 44)): Expected space separating root-level values# at [Source: (String)"1,2"; line: 1, column: 3]
curl -v "http://localhost:8080/test?ids=1&ids=2"# => logs: {ids=2} --> 1 is missing
curl -v "http://localhost:8080/test?ids[]=1&ids[]=2"# => Validation error: Query parameter 'ids' is required on path '/test' but not found in request.
Is there a way that I can support the other styles without getting a validation issue?
The text was updated successfully, but these errors were encountered:
When I have an OpenAPI spec that accepts a list as parameter:
using a configuration that validates the requests:
The only way I can make the list parameter work as expected is by wrapping it in
[]
braces:curl -v 'http://localhost:8080/test?ids=\[1,2\]'
Other list types like the ones specified in https://www.rfc-editor.org/rfc/rfc6570#section-3.2.9 or the commonly used
param[]=
style either don't pass the validation, raise an error or don't parse the list as expectedIs there a way that I can support the other styles without getting a validation issue?
The text was updated successfully, but these errors were encountered: