serverless / serverless-kubeless

This plugin enables support for Kubeless within the Serverless Framework.
Apache License 2.0
303 stars 80 forks source link

Method is not honored #183

Open ewrogers opened 5 years ago

ewrogers commented 5 years ago

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.

andresmgot commented 5 years ago

That's correct, the method key is not being used by kubeless. Every function accept all the methods right now.