Ring-swagger Api Documentation

Version: 0.22.3

ring.swagger.middleware

comp-mw

(comp-mw mw & base-params)

default-error-handler

(default-error-handler {:keys [error]})

get-swagger-data

(get-swagger-data request)

Reads top-level swagger-data from request, pushed in by set-swagger-data.

set-swagger-data

(set-swagger-data request data)(set-swagger-data request f & data)

Sets extra top-level swagger-data into a request. By default, deep-merges gives data in. Data can be read with get-swagger-data.

stringify-error

(stringify-error error)

wrap-swagger-data

(wrap-swagger-data handler data)

Middleware that adds top level swagger-data into request.

wrap-validation-errors

(wrap-validation-errors handler & [{:keys [error-handler catch-core-errors?]}])

Middleware that catches thrown ring-swagger validation errors turning them into valid error respones. Accepts the following options:

:error-handler - a function of schema.utils.ErrorContainer -> response :catch-core-errors? - consume also :schema.core/errors (defaults to false)