Fork me on GitHub
#ring-swagger
<
2016-05-20
>
trieloff16:05:01

@ikitommi: thanks, I’m now using resources for the second microservice and it works well.

trieloff17:05:20

One question remains for me: is there a way to inject something into the headers map of a response.

trieloff17:05:58

I’m trying to get this:

"responses": {
          "200": {
            "description": "My default response",
            “headers": {
              "Content-Type": {
                "type": "String"
              }
            }
          }

trieloff17:05:42

When I add {:responses {200 {:schema s/Any :description "My default response" :foobar {"Content-Type" {:type "String"}}} I get:

"responses": {
          "200": {
            "description": "My default response",
            "foobar": {
              "Content-Type": {
                "type": "String"
              }
            }
          }

trieloff17:05:57

So adding foobar does work. However when I change it to {:responses {200 {:schema s/Any :description "My default response" :headers {"Content-Type" {:type "String"}}} I’m getting:

"responses": {
          "200": {
            "description": "My default response"
          },

trieloff17:05:13

So the headers parameter gets filtered out

ikitommi21:05:31

@trieloff haven't used the response headers myself and coudn't find any tests to verify it works :( could you try adding :headers {"Content-type" String}. If that doesn't work, please file an issue of this, will be fixed then.