Fork me on GitHub

@socksy coercion defines model for the parameters and has a -get-apidocs function, which turns the parameter models into swagger/json-schema. So, it is needed. Neither clojure.spec or schema has a way good way to decorate the models with arbitrary meta-data for the docs. Spec-tools & schema-tools help here. The coercion definition in route-data doesn't do anything by itself, it's just data. Swagger-endpoints read that as well as the optional coercion middleware/interceptors for the actual request/response coercion.


if you just want the docs, and know how to write swagger-schema by hand, you can put that under :swagger, example here:


... in that case, no coercion or spec/schema-tools are needed. This could be in the docs too...


@ikitommi great, thanks for the breakdown