(defn ^:foo bar []) is equivalent to
(defn ^{:foo true} bar []) is equvalent to
(defn bar {:foo true} [])
In the first two cases, the metadata is actually applied to the bar symbol
(by the Clojure reader) and then copied over to the #'bar Var. In the
latter case, the #'bar Var gets the metadata d
Got it, thanks.
I think you still need to prepend ^'s to the metadata.
On Thu, Aug 27, 2015 at 8:40 PM, Howard Lewis Ship wrote:
> That's misleading. In the case of convention function names, (index,
> show, create), there's default :route metadata that is used automatically
> ... the docstrin
That's misleading. In the case of convention function names, (index, show,
create), there's default :route metadata that is used automatically ... the
docstrings are merely supplying a reminder.
This is described in the "Getting Started" page:
https://portal.aviso.io/#/document/open-source/rook/C
Rook is considerably more opinionated than Liberator and is based on
extending the Ring metaphor: building up the functionality of the web
application by introducing layers of middleware.
The explicit goal is a mapping of URIs to endpoint functions within a
namespace, and the introduction of custo
Hi Howard,
In the example application it seems the routing information is encoded in
the beginning of the docstring and not the actual metadata. Is there an
option to put this info in the metadata of the var?
On Mon, Aug 24, 2015 at 6:31 PM, Howard Lewis Ship wrote:
> Rook is a set of middlewar
Hi Howard
Thanks for sharing this. Can you comment briefly on how this compares and
contrasts to Liberator? I know they're not exactly the same, but they're
definitely in the same neighbourhood.
On Tue, Aug 25, 2015 at 3:31 AM Howard Lewis Ship wrote:
> Rook is a set of middleware and handlers
Rook is a set of middleware and handlers to enable metadata-based routing
for Ring web applications.
The intention is to expose a Clojure namespace as a web service resource;
there’s a default mapping of HTTP verbs and paths to function names; these
can be extended or overridden by metadata on the