I want two routes
/admin/deals
/admin/deals/{dealId}
Where a request to “/admin/deals” returns all deals and “/admin/deals/1” returns a specific deal. Pretty standard RESTful paths.
I’ve tried
adminGetDeal:
handler: path
events:
- http:
path: admin/deals/{dealId}
method: get
request:
parameters:
paths:
dealId: false
And the only thing that would respond with this configuration was things in the format of “/admin/deals/foo” I never got a response from either “/admin/deals” or “/admin/deals/”.
I was able to get this working by declaring two routes, but that a LOT of extra code to make this work. Curious if there is a better way to do this?
We are currently using version 1.11.x