serverless / serverless-openwhisk

Adds Apache OpenWhisk support to the Serverless Framework!
http://openwhisk.org/
MIT License
143 stars 47 forks source link

Support path parameters for APIGateway #114

Closed csantanapr closed 6 years ago

csantanapr commented 6 years ago

Recently the CLI and Backend was updated to support path parameters

In CLI you would configure like

wsk api create /api /users/{id} get myWebAction --reponse-type http

I want to be able to configure same using serverless yml file

service: ibm-scala-sbt-cloud-function

provider:
  name: openwhisk
  runtime: java
  memory: 512
  timeout: 60
functions:
  hello:
    handler: target/scala-2.12/hello.jar:hello.Handler
    events:
      - http: 
          path: /api/hello/{id}
          method: get
          resp: http
          request:
            parameters:
              paths:
                id: true
plugins:
  - "serverless-openwhisk"
jthomas commented 6 years ago

Other users are reporting this issue: https://forum.serverless.com/t/path-variables-for-openwhisk-apis/4162

jthomas commented 6 years ago

This will be automatically supported when the feature is supported in the client library. https://github.com/apache/incubator-openwhisk-client-js/pull/114