Liking cljdoc? Tell your friends :D

route-swagger.interceptor


coerce-requestclj

(coerce-request)
(coerce-request f)

Creates an interceptor that coerces the params for the selected route, according to the route's swagger documentation. A coercion function f that acceps the route params schema and a request and return a request can be supplied. The default implementation throws if any coercion error occurs.

Creates an interceptor that coerces the params for the selected route,
according to the route's swagger documentation. A coercion function f that
acceps the route params schema and a request and return a request can be
supplied. The default implementation throws if any coercion error occurs.
raw docstring

swagger-jsonclj

(swagger-json)
(swagger-json f)

Creates an interceptor that serves the generated documentation on the path of your choice. Accepts an optional function f that takes the swagger-object and returns a json body.

Creates an interceptor that serves the generated documentation on the path of
your choice. Accepts an optional function f that takes the swagger-object and
returns a json body.
raw docstring

swagger-uiclj

(swagger-ui & path-opts)

Creates an interceptor that serves the swagger ui on a path of your choice. Note that the path MUST specify a splat argument named "resource" e.g. "my-path/*resource". Acceps additional options used to construct the swagger-object url (such as :app-name :your-app-name), using pedestal's 'url-for' syntax.

Creates an interceptor that serves the swagger ui on a path of your choice.
Note that the path MUST specify a splat argument named "resource" e.g.
"my-path/*resource". Acceps additional options used to construct the
swagger-object url (such as :app-name :your-app-name), using pedestal's
'url-for' syntax.
raw docstring

validate-responseclj

(validate-response)
(validate-response f)

Creates an interceptor that validates the response for the selected route, according to the route's swagger documentation. A validation function f that accepts the route response schema and a response and return a response can be supplied. The default implementation throws if a validation error occours.

Creates an interceptor that validates the response for the selected route,
according to the route's swagger documentation. A validation function f that
accepts the route response schema and a response and return a response can be
supplied. The default implementation throws if a validation error occours.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close