I’m moving over an existing api from compojure-api
to reitit
and we have multiple http methods with the same path. I’ve added {:conflicts nil}
which resolves the compilation error but only one of my endpoints are working. A distilled example:
["/api/attachments"
{:swagger {:tags ["attachments"]}}
["/"
{:get {:summary "downloads an attachment"
:handler (fn [_]
{:status 200
:body {:hello "world"}})}}]
["/"
{:post {:summary "uploads an attachment"
:handler (fn [_]
{:status 200
:body {:hello "world"}})}}]
]
@jkent you need to add both :get
and :post
to same path.
thanks for the quick reply. I’ll give that a go
by design, if a there is a full match on a path, no other paths are looked. Also, you can remove the :conflicts
with that.
thank you. that resolved my issue