Fork me on GitHub
#ring-swagger
<
2017-02-23
>
ikitommi07:02:28

hi. everyone who want’s to see full Spec integration, go thumb this one up: http://dev.clojure.org/jira/browse/CLJ-2116

daveliepmann16:02:50

Should I expect validation errors to come through as strings from the Swagger UI? E.g. Request validation failed: [email protected] versus "{:x missing-required-key}"

ikitommi16:02:13

validation errors should come out as maps, encoded in format the client requested.

ikitommi16:02:35

e.g. in json. Where do you get that string?

ikitommi16:02:51

hmm.. have you disabled the api-middleware?

ikitommi16:02:13

it has exception handling for those.

daveliepmann16:02:13

Yes, I expect that's it, but any guidance on which middleware is doing that work would be helfpul

ikitommi16:02:33

compojure.api.middleware/wrap-exceptions

daveliepmann16:02:17

awesome, thanks

ikitommi16:02:17

it reads a options map to configure how to handle different exceptions. See the source for defaults.