-
Notifications
You must be signed in to change notification settings - Fork 84
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
Support all collectionFormats #69
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Swagger spec defines multiple ways to handle collections in string parameters (query, header, url encoded form params):
https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parameter-object
Currently only
multi
format is supported. This works fine for query strings where the same property is repeated for each value:?items=a&items=b&items=c
. For this case we have coercion to coerce single item to collection when needed.Some parameters (headers) don't support this multi format and instead the collection needs to be represented as single string with separators. For this we need an coercer that can split an string using selected separator. This coercion should only be done when needed. Probably based on Schema record. For users, the API should be something like:
:header-params [items (collection [s/Str] :csv)]
.The text was updated successfully, but these errors were encountered: