Fork me on GitHub
#reitit
<
2019-11-08
>
conan18:11:21

I seem always to get name conflict errors for routes when I don't specify names. I've never done this much before, but there have been a few version bumps since I was last using reitit (so happy to be back), are names now compulsory for all routes? For example

["" {:name "public api routes"}
         ["/logout" {:post logout}]
         ["/health" {:get (fn [_] {:version version})}]]
Gives me
Router contains conflicting route names:

public api routes
-> /api/health
-> /api/logout
I don't really want to name these routes as they're too trivial to need it

ikitommi18:11:00

@conan names are optional. The :name for "" route gets accumulates for both endpoints here

conan18:11:46

oh, that makes me think i'm using names wrong, is there something else i should be doing to document what my routes are for?

ikitommi18:11:58

:name is reserved, for reverse routing, just use... :description?

conan18:11:21

ah :man-facepalming: thanks, will do

ikitommi18:11:00

or {:swagger {:tags ["something"]}} to group them in the swagger-ui

🤯 4