diction.http

->parameter-element-id

(->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`.

->payload-element-id

(->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`.

->route

(->route request)
Convert HTTP `request` to route map with `:method` and `:uri` keys.

bad-request-response-f

Atom for bad request response function.

bad-request-response-f!

(bad-request-response-f! f)
Sets the bad request response function to `f`.
(bad-request-response-f! (fn [x] {:status 400 :body x}))

parameter-validation-routes

Atom with parameter validation routes.

```
{"path" {:method :parameter-data-element-validation-id}}
```

parameter-validation-routes!

(parameter-validation-routes! pvrs)
Sets the `parameter-validation-routes` map with `pvrs`.

payload-validation-routes

Atom with payload validation routes.

```
{"path" {:method :data-element-validation-id}}
```

payload-validation-routes!

(payload-validation-routes! pvrs)
Set the `payload-validation-routes` map with `pvrs`.

simple-bad-request-response

(simple-bad-request-response body)
Simple bad request due to invalid payload or parameters given validation
error messages `body`.

validate

(validate route-lookup-f request-key v-type handler)
Validation of request payload wrapped function.

validate-parameters

Partial function to validation parameters.

validate-payload

Partial function to validate payload.