-
Notifications
You must be signed in to change notification settings - Fork 262
Open
Labels
Description
Reitit allows two syntaxes for path parameters, colon and bracket syntax
[["/users/:user-id" {:handler get-user}]
["/api/:version/ping" {:handler ping-version}]]
[["/users/{user-id}" {:handler get-user}]
["/files/file-{number}.pdf" {:handler get-pdf}]]The bracket syntax is required for namespaced keywords, for example
[["/users/{user/id}" {:handler get-user}]
["/files/file-{file/number}.pdf" {:handler get-pdf}]]However, when using the bracket syntax, you lose the correspondence between keywords in the route and keywords in the request map. I think it would be very helpful if also the bracket syntax would allow a colon, i.e.,
[["/users/{:user/id}" {:handler get-user}]
["/files/file-{:file/number}.pdf" {:handler get-pdf}]]This gives you immediate visual recognition of keywords in the route.
mk
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Not right now