(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 directly. On Thu, Aug 27, 2015 at 10:46 AM, Atamert Ölçgen <mu...@muhuk.com> wrote: > 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 <hls...@gmail.com> > wrote: > >> 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/Current/getting-started.html >> >> If you look at the increment endpoint function, which is not a convention >> name, it has explicit :route metadata. >> >> I'll update the example to make this much more clear. >> >> >> On Tue, Aug 25, 2015 at 7:43 AM, Atamert Ölçgen <mu...@muhuk.com> wrote: >> >>> 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 <hls...@gmail.com> >>> wrote: >>> >>>> 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 functions in >>>> the namespace. >>>> >>>> The end result is that a compliant web service resource can be created >>>> in very little code. >>>> >>>> Rook also supports Swagger 2.0: a detailed JSON description of your web >>>> service is generated directly from the functions and metadata. >>>> >>>> Recent changes: >>>> >>>> * Described more of the APIs using Prismatic Schema >>>> * Added ability to reuse the argument resolution logic outside of >>>> endpoint functions >>>> * Many improvements to the Swagger 2.0 description support >>>> >>>> https://github.com/AvisoNovate/rook >>>> >>>> -- >>>> Howard M. Lewis Ship >>>> >>>> Looking for Clojure engagements: coding, architecture, mentoring & more! >>>> >>>> Creator of Apache Tapestry >>>> >>>> (971) 678-5210 >>>> http://howardlewisship.com >>>> @hlship >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Clojure" group. >>>> To post to this group, send email to clojure@googlegroups.com >>>> Note that posts from new members are moderated - please be patient with >>>> your first post. >>>> To unsubscribe from this group, send email to >>>> clojure+unsubscr...@googlegroups.com >>>> For more options, visit this group at >>>> http://groups.google.com/group/clojure?hl=en >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Clojure" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to clojure+unsubscr...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Kind Regards, >>> Atamert Ölçgen >>> >>> ◻◼◻ >>> ◻◻◼ >>> ◼◼◼ >>> >>> www.muhuk.com >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to clojure@googlegroups.com >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> clojure+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/clojure?hl=en >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to clojure+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Howard M. Lewis Ship >> >> Starting with WalMart Labs on Sep 28th! >> >> Creator of Apache Tapestry >> >> (971) 678-5210 >> http://howardlewisship.com >> @hlship >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Kind Regards, > Atamert Ölçgen > > ◻◼◻ > ◻◻◼ > ◼◼◼ > > www.muhuk.com > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Howard M. Lewis Ship Starting with WalMart Labs on Sep 28th! Creator of Apache Tapestry (971) 678-5210 http://howardlewisship.com @hlship -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.