(app spellbook & services)
Creates a full ring application with default wrappers given a spellbook and conjured services
Creates a full ring application with default wrappers given a spellbook and conjured services
(arg-count f)
(assemble-call path-fn body-fn method)
(body-fn args)
(call-> {call :call schema :schema} & thens)
Calls the endpoint, and if the response is successful, passes the parsed response through to the supplied functions one after the other
Calls the endpoint, and if the response is successful, passes the parsed response through to the supplied functions one after the other
(client {services :services :as spellbook} service-name & opts)
Create a REST client for a particular service from a spellbook
Create a REST client for a particular service from a spellbook
(coerce value spec)
(coerce schema result)
(construct-input {:keys [params body]} input-spec)
Given a request and an input spec, coerces the components to the correct types and then validates that everything looks as expected.
Given a request and an input spec, coerces the components to the correct types and then validates that everything looks as expected.
(endpoint impls [endpoint spec])
Creates a bidi endpoint from the given impls and an endpoint specification
Creates a bidi endpoint from the given impls and an endpoint specification
(endpoint base-url {:keys [path method args returns] :as spec})
(format-path values [f & fragments])
(parse schema result)
(parse-params params input-spec)
(path-fn base-path path)
(root services)
(service {services :services :as spellbook} service-name & impls)
Creates a bidi service from the given impls and spellbook
Creates a bidi service from the given impls and spellbook
(stringify x)
(urlify value)
(validate received expected raise!)
Validates that a received payload matches the expected schema. Raises <raise!> if not.
Validates that a received payload matches the expected schema. Raises <raise!> if not.
(version-service {version :version})
version version version version
version version version version
(wrap endpoints)
(wrap-endpoint {:keys [args returns response] :or {response ok}} f)
Wraps a given endpoint implementation in the gubbins for a ring request Different outcomes for different arity implementions: 0 arity -> just calls the function 1 arity -> provides a parameter map from the request body and url 2 arity -> provides a parameter map and an options map containing things like cookies etc. Also validates that the inputs and outputs match the specification in the spellbook
Wraps a given endpoint implementation in the gubbins for a ring request Different outcomes for different arity implementions: 0 arity -> just calls the function 1 arity -> provides a parameter map from the request body and url 2 arity -> provides a parameter map and an options map containing things like cookies etc. Also validates that the inputs and outputs match the specification in the spellbook
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close