oliyh / martian

The HTTP abstraction library for Clojure/script, supporting OpenAPI, Swagger, Schema, re-frame and more
MIT License
530 stars 44 forks source link

Support collectionFormat #61

Closed pbwolf closed 2 months ago

pbwolf commented 5 years ago

For a Swagger parameter specified like this

{"name":"apples", "in":"query", "type":"array", "items":{"type": "string"}, "collectionFormat":"ssv"}

martian constructs an HTTP request that HttpClient logs like this: GET igloo?apples=red&apples=green HTTP/1.1

but the ReST service expects apples=red%20green

collectionFormat is described at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameter-object

dummaso commented 2 months ago

Hi! Any updates on this / any way one can support? Just ran into this issue myself :D

oliyh commented 2 months ago

Hello,

No updates on this I'm afraid, I haven't had time to work on it.

oliyh commented 2 months ago

I just tried this: https://github.com/oliyh/martian/pull/207/files

But then found I had already had a go at this before! https://github.com/oliyh/martian/compare/master...collection-format

I think I prefer this new attempt, it's a bit more self-contained.

oliyh commented 2 months ago

Deployed in 0.1.27-SNAPSHOT - please try it and let me know