Default options used by openapi-handler
Default options used by openapi-handler
(handlers routes schema & {:as opts})From a map of [method path] -> ring handler returns a map of [method path] -> openapi-wrapped-handler.
Options:
:key-fn - Control map keys decoding when turning jackson JsonNodes to clj
data for the handler - default to keyword
:query-string-params-key - where to find the decoded query-string
parameters - defaults to :query-params
:validation-result - function that controls how to turn
com.networknt.schema.ValidationResult into a clj -> json response. Defaults
to s-exp.legba.openapi-schema/validation-result
throw and assocs the error on the ring response as response-validation-error.
From a map of [method path] -> ring handler returns a map of [method path] -> openapi-wrapped-handler. Options: * `:key-fn` - Control map keys decoding when turning jackson JsonNodes to clj data for the handler - default to `keyword` * `:query-string-params-key` - where to find the decoded query-string parameters - defaults to `:query-params` * `:validation-result` - function that controls how to turn `com.networknt.schema.ValidationResult` into a clj -> json response. Defaults to `s-exp.legba.openapi-schema/validation-result` throw and assocs the error on the ring response as response-validation-error.
(routing-handler routes schema & {:as opts})Same as routing-handler* but wraps with
s-exp.legba.middleware/wrap-error-response middleware turning exceptions
into nicely formatted error responses
Same as `routing-handler*` but wraps with `s-exp.legba.middleware/wrap-error-response` middleware turning exceptions into nicely formatted error responses
(routing-handler* routes schema & {:as opts :keys [path-params-key]})Takes a map of routes as [method path] -> ring-handler, turns them into a map
of routes to openapi handlers then creates a handler that will dispatch on the
appropriate openapi handler from a potential router match. If not match is
found, returns not-found-response.
Options:
:not-found-response - defaults to {:status 404 :body " Not found "}
:key-fn - Control map keys decoding when turning jackson JsonNodes to clj
data for the handler - default to keyword
:query-string-params-key - where to find the decoded query-string
parameters - defaults to :query-params
:validation-result - function that controls how to turn
com.networknt.schema.ValidationResult into a clj -> json response. Defaults
to s-exp.legba.openapi-schema/validation-result
:extra-routes - extra routes to be passed to the underlying router
throw and assocs the error on the ring response as response-validation-error.
Takes a map of routes as [method path] -> ring-handler, turns them into a map
of routes to openapi handlers then creates a handler that will dispatch on the
appropriate openapi handler from a potential router match. If not match is
found, returns `not-found-response`.
Options:
* `:not-found-response` - defaults to `{:status 404 :body " Not found "}`
* `:key-fn` - Control map keys decoding when turning jackson JsonNodes to clj
  data for the handler - default to `keyword`
* `:query-string-params-key` - where to find the decoded query-string
   parameters - defaults to `:query-params`
* `:validation-result` - function that controls how to turn
  `com.networknt.schema.ValidationResult` into a clj -> json response. Defaults
  to `s-exp.legba.openapi-schema/validation-result`
* `:extra-routes` - extra routes to be passed to the underlying router
throw and assocs the error on the ring response as response-validation-error.  cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |