Hi all - new to reitit and curious about route conflicts. I have a very standard REST API with two routes:
GET /api/communities
POST /api/communities
Reitit is reporting that this is a conflict. Do the HTTP verbs not uniquely identify the routes?
Being new to this though maybe I just donβt have my route data structures setup correctly.. this is what I have
["/api"
["/communities"
{:get {:summary "Get list of communities"
:parameters {}
:response {200
{:body communities-api-shape}}
:handler handler/communities-handler}}]
["/communities"
{:post {:summary "Create a new community"
:parameters {:body communities-api-shape}
:response {200
{:body string?}}
:handler handler/create-community-handler}}]
you normally just put it under one route, have a look here:
<https://github.com/dharrigan/startrek/blob/master/src/startrek/base/api/starship/routes.clj>
notice how get and post (and delete and patch) are all nested under the route
Maybe that might help π
ah! thank you!
you're most welcome π
that fixed it π
:thumbsup: