Fork me on GitHub
#ring-swagger
<
2018-04-05
>
igrishaev06:04:14

@ikitommi unfortunately it’s not, I tested with the latest 3.13.2 and some previous ones with the same result. To give you more details, I was trying to connect swagger with FHIR schemas. FHIR is a medical standard to store medical information. Schemas might be found here: https://www.hl7.org/fhir/fhir.schema.json.zip My swagger file mentions just a single entity, but that’s enough to ruin swagger:

{"swagger": "2.0",
 "schemes": ["http"],
 "info": {"contact": {"email": ""},
          "title": "sdfsdfsf"},
 "paths": {"/foo": {"get": {"description": "sdfsdfsdfdsf",
                            "responses": {200: {"description": "sdfsdf",
                                                "schema": {"$ref": "./fhir.schema.json/Practitioner.schema.json"}}}

}}}
}

ikitommi08:04:36

@jmckitrick the content-type shoud be set automatically if you haven’t changed the default api options. e.g.

(api
  (GET "/ping" []
    (ok {:kikka "kukka"})))
… encodes the response data into JSON (or whatever the client has requested) and sets the headers.

ikitommi08:04:12

if you have a failing example, I could take a look.

ikitommi08:04:11

@igrishaev sorry, that falls into the swagger.js domain, bug somewhere there. Could you raise issue there?

igrishaev08:04:29

@ikitommi yes, I’ll submit one a bit later. Currently, I crafted those schemas manually.

jmckitrick12:04:39

@ikitommi My mistake, I forgot the response headers are not keywords….

ikitommi15:04:58

been there 🙂