ring-swagger & compojure-api

is it common to define the schema for error responses with ring-swagger/schema?


from what i can tell with compojure api, only 200 responses are validated against a schema

ikitommi 2017-11-03T06:14:52.000054Z

Really? I believe setting :responses {500 {:schema ErrorSchema}} should validate that too.

ikitommi 2017-11-03T06:15:43.000081Z

:return is just a shortcut to setting the 200 response.

ikitommi 2017-11-03T06:18:46.000073Z

We haven't usually described the errors. Usually returning a map with key :type as a convention to dispatch on on the client side.