This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-26
Channels
- # admin-announcements (33)
- # beginners (41)
- # boot (97)
- # clojure (220)
- # clojure-berlin (3)
- # clojure-russia (31)
- # clojure-sg (3)
- # clojurebridge (2)
- # clojurescript (137)
- # clojutre (13)
- # core-matrix (10)
- # core-typed (1)
- # cursive (18)
- # datascript (1)
- # datomic (93)
- # devops (6)
- # editors (18)
- # emacs (1)
- # funcool (43)
- # hoplon (4)
- # immutant (6)
- # instaparse (3)
- # jobs (25)
- # ldnclj (14)
- # ldnproclodo (4)
- # off-topic (20)
- # om (21)
- # rdf (79)
- # re-frame (14)
- # reagent (12)
- # ring-swagger (18)
- # yada (52)
hi, i am trying to spread my routes over multiple files but i swagger is not recognizing some of my routes , here is an example http://paste.ubuntu.com/12198637/
@juhoteperi: is there a specific way to do this?
shaym: defroutes*
Readme only mentions it in relation to legacy routes but it should be used also when you are defining routes in several places
https://github.com/metosin/compojure-api/blob/master/examples/src/examples/pizza.clj#L53
@shaym: Defroutes walks through the code to collect route data and associates that to var metadata
@juhoteperi: and defapi doesnt do it when there is an indirection via a var ?
Or rather, it stores the source code of route to var metadata so that when defapi
encounters a var it can read the original source code and use that for the route collection
With normal def the route is evaluated so defapi
would be unable to parse the original source code
I’m not sure if Compojure-api is the best place to look for macro examples. I’m thinking, it does lots of things better avoided if possible 😄