An extension to liberator allowing for composable mixins.
The change to version 1.x was done to denote a breaking change rather than signal a newly achieved degree of stability. The hal.core functionality that implements Representation now requires a discovery-url-fn
function to be included in the context if you want it to automatically add a discovery url to the resource. This was done to avoid tying this library to the hype library, and thus to to the bidi router.
To maintain prior behaviour, apply the following change to your code following the upgrade. Add this new mixin and include it as part of your resource:
(defn with-discovery-url-fn []
{:initialize-context
(fn [{:keys [request routes]}]
{:discovery-url-fn #(hype/absolute-url-for request routes :discovery)})})
Add the following to your project.clj
file:
[b-social/liberator-mixin "1.0.0"]
Run tests using:
lein test
Prerequisites:
You should then be able to run:
lein release
This will handle changing the versions everywhere, and adding the version tags. It will deploy the latest to Clojars and push all the changes to GitHub.
Copyright © 2018 B-Social Ltd.
Distributed under the terms of the MIT License.
Can you improve this documentation? These fine people already did:
Toby Clemson, Alex Parlett, Paul Hutchin, Robert Shilcof, Samuel Fekete, Dominic, Tristram Oaten, Jonas Svalin & Dominic FreestonEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close