ring-swagger
ring-swagger copied to clipboard
WIP: Adds support for string to collection coercion based on collectionFormat
Fixes #69
TODO:
- We currently use collectionFormat multi as default in other parts of code: https://github.com/metosin/ring-swagger/blob/master/src/ring/swagger/json_schema.clj#L56, per Swagger/OpenAPI spec csv should be the default
- Coercion tests are broken, they use broken
coercer
function which returns matchers instead of coercer so they only run single layer of coercions instead of doing recursive coercion - Would be nicer to set
collection-format
instead ofcollectionFormat
. Maybe json-schema should do key transformations so that snake-case can be used here?
LGTM
This should be merged?
Only if the todo items are implemented.
@Deraen Any plans to complete this? I'd be eager to use it. I guess the best alternative now is to spec the param to string and do parsing in the app?