ring-swagger & compojure-api

are you using swagger3/openapi v3?

sparkofreason 2019-03-18T17:44:19.026400Z

Whatever the latest compojure-api does.

sparkofreason 2019-03-18T17:45:30.026900Z

Does describe work with specs?

ikitommi 2019-03-18T19:03:40.028300Z

@mgrbyte The muuntaja should be always present, within the api, injected in here: https://github.com/metosin/compojure-api/blob/master/src/compojure/api/middleware.clj#L279

mgrbyte 2019-03-19T10:03:04.034800Z

I've run into a case where it's not set (in a custom exception handler for the :compojure.api.exception/request-validation error). I'll try and find time to knock up an example repo with minimal steps to reproduce, but am vacation from tomorrow, so might not be for a week or so.

ikitommi 2019-03-19T11:33:29.037200Z

e.g. the exception handler happens before the request-injection. I presume it’s safe to reverse the order. PR welcome, after the vacations πŸ™‚

ikitommi 2019-03-18T19:05:08.029900Z

but there is the create-muuntaja in that namespace, if you need the instance outside of the api.

ikitommi 2019-03-18T19:06:41.031900Z

@dave.dixon c-api ships with 2.x version of the swagger-ui. You can update manually the ring-swagger-ui to get the latest version.

ikitommi 2019-03-18T19:08:19.034700Z

for specs, there is spec-tools.core/spec that can be used to add extra info to the specs. Spec-tools docs should have examples of that