Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Method is not honored #183

Open
ewrogers opened this issue Aug 15, 2019 · 1 comment
Open

Method is not honored #183

ewrogers opened this issue Aug 15, 2019 · 1 comment

Comments

@ewrogers
Copy link

ewrogers commented Aug 15, 2019

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
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants