A liberator mixin to add HAL support to liberator.
In short:
application/hal+json
as a supported media type.:handle-not-found
.Depends on:
Optionally extends:
The JSON serialisation support for the application/hal+json
media type uses
the same underlying JSON encoder as the
[[liberator-mixin.json.core|JSON mixin]]. If that mixin is configured with a
custom JSON encoder, all application/hal+json
responses will use the custom
JSON encoder.
Resource
supportThe halboy resource support
will add a :discovery
link to any returned resource and expects bidi
:routes
to be available in the context
, containing a route named
:discovery
. The [[liberator-mixin.hypermedia.core|hypermedia mixin]] adds
routes to the context
so nothing further is needed if that mixin is in use.
A liberator mixin to add [HAL](https://tools.ietf.org/html/draft-kelly-json-hal-00) support to liberator. In short: - Adds `application/hal+json` as a supported media type. - Adds support for JSON serialisation for maps and seqs for the HAL media type. - Adds support for [halboy](https://github.com/jimmythompson/halboy) resource serialisation. - Adds a default handler responding with an empty HAL resource for `:handle-not-found`. - Adds a HAL error representation for use with the [[liberator-mixin.validation.core|validation mixin]]. Depends on: - the [[liberator-mixin.json.core|JSON mixin]], - the [[liberator-mixin.hypermedia.core|hypermedia mixin]]. Optionally extends: - the [[liberator-mixin.validation.core|validation mixin]]. ### JSON serialisation support The JSON serialisation support for the `application/hal+json` media type uses the same underlying JSON encoder as the [[liberator-mixin.json.core|JSON mixin]]. If that mixin is configured with a custom JSON encoder, all `application/hal+json` responses will use the custom JSON encoder. ### halboy `Resource` support The [halboy](https://github.com/jimmythompson/halboy) resource support will add a `:discovery` link to any returned resource and expects `bidi` `:routes` to be available in the `context`, containing a route named `:discovery`. The [[liberator-mixin.hypermedia.core|hypermedia mixin]] adds routes to the `context` so nothing further is needed if that mixin is in use.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close