(->param-schema param)
Given a param applies the similar logic as prop to schema Intended for Parameter
Given a param applies the similar logic as prop to schema Intended for Parameter
(->prop-schema required property)
Given a property and a required keys set, returns a malli spec. Intended for RequestBody
Given a property and a required keys set, returns a malli spec. Intended for RequestBody
(handle-media-type-key s)
If the media type is "default", then return it as a keyword, otherwise pass through.
If the media type is "default", then return it as a keyword, otherwise pass through.
(handle-response-key s)
Reitit seems to want status codes of a response to be integer keys,
rather than keyword keys or string keys (except for :default
).
So, convert a string to a Long if relevant.
Else if the string is "default", then return :default
, otherwise pass through.
Arguably, all non-integer status codes should be converted to keywords.
Reitit seems to want status codes of a response to be integer keys, rather than keyword keys or string keys (except for `:default`). So, convert a string to a Long if relevant. Else if the string is "default", then return `:default`, otherwise pass through. Arguably, all non-integer status codes should be converted to keywords.
(media-type->data mt)
Convert a Java Schema's MediaType to a spec that Reitit will accept.
Convert a Java Schema's MediaType to a spec that Reitit will accept.
(operation->data op handlers)
Converts a Java Operation to a map of parameters, responses, schemas and handler that conforms to reitit.
Converts a Java Operation to a map of parameters, responses, schemas and handler that conforms to reitit.
(path-item->data path-item handlers)
Converts a path to its corresponding vector of method and the operation map
Converts a path to its corresponding vector of method and the operation map
(response->data response)
Convert an ApiResponse to a response conforming to reitit.
Convert an ApiResponse to a response conforming to reitit.
(routes-from api-spec handlers)
Takes in the OpenAPI JSON/YAML as string and a map of OperationId to handler fns. Returns the reitit route map with malli schemas
Takes in the OpenAPI JSON/YAML as string and a map of OperationId to handler fns. Returns the reitit route map with malli schemas
(update-kvs m key-fn val-fn)
Update a map using key-fn
and val-fn
.
Sort of like composing update-keys
and update-vals
.
Unlike update-keys
or update-vals
, preserve nil
s.
Update a map using `key-fn` and `val-fn`. Sort of like composing `update-keys` and `update-vals`. Unlike `update-keys` or `update-vals`, preserve `nil`s.
(wrap-map k m)
Surrounds the key in a map for malli conformance
Surrounds the key in a map for malli conformance
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close