serverless-kubeless
serverless-kubeless copied to clipboard
Method is not honored
It seems that the method value is not honored in the serverless.yml functions:
functions:
get-users:
handler: handler.getUsers
events:
- http:
method: get
path: "${self:custom.apiPrefix}/users"
add-user:
handler: handler.addUser
events:
- http:
method: post
path: "${self:custom.apiPrefix}/users"
Both GET and POST route to the same get-users handler function. Is the expectation really to make sure each route has an individual and unique name? It's a bit unconventional for REST API development to not support this.
That's correct, the method key is not being used by kubeless. Every function accept all the methods right now.