(->parameter-element-id {:keys [method uri] :as route})
Converts route
to parameter element ID given the :method
and :uri
in the route
. Returns the parameter validation element ID (if found), or nil
.
Converts `route` to parameter element ID given the `:method` and `:uri` in the `route`. Returns the parameter validation element ID (if found), or `nil`.
(->payload-element-id {:keys [method uri] :as route})
Converts route
to payload element ID given the :method
and :uri
in the route
. Returns the payload validation element ID (if found), or nil
.
Converts `route` to payload element ID given the `:method` and `:uri` in the `route`. Returns the payload validation element ID (if found), or `nil`.
(->route request)
Convert HTTP request
to route map with :method
and :uri
keys.
Convert HTTP `request` to route map with `:method` and `:uri` keys.
Atom for bad request response function.
Atom for bad request response function.
(bad-request-response-f! f)
Sets the bad request response function to f
.
(bad-request-response-f! (fn [x] {:status 400 :body x}))
Sets the bad request response function to `f`. (bad-request-response-f! (fn [x] {:status 400 :body x}))
Atom with parameter validation routes.
{"path" {:method :parameter-data-element-validation-id}}
Atom with parameter validation routes. ``` {"path" {:method :parameter-data-element-validation-id}} ```
(parameter-validation-routes! pvrs)
Sets the parameter-validation-routes
map with pvrs
.
Sets the `parameter-validation-routes` map with `pvrs`.
Atom with payload validation routes.
{"path" {:method :data-element-validation-id}}
Atom with payload validation routes. ``` {"path" {:method :data-element-validation-id}} ```
(payload-validation-routes! pvrs)
Set the payload-validation-routes
map with pvrs
.
Set the `payload-validation-routes` map with `pvrs`.
(simple-bad-request-response body)
Simple bad request due to invalid payload or parameters given validation
error messages body
.
Simple bad request due to invalid payload or parameters given validation error messages `body`.
(validate route-lookup-f request-key v-type handler)
Validation of request payload wrapped function.
Validation of request payload wrapped function.
Partial function to validation parameters.
Partial function to validation parameters.
Partial function to validate payload.
Partial function to validate payload.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close