serverless-openwhisk icon indicating copy to clipboard operation
serverless-openwhisk copied to clipboard

Wrong URL when using the non-default package

Open epiresdasilva opened this issue 4 years ago • 0 comments

A wrong URL is built when using the non-default package for my functions using the serverless-openwhisk plugin.

Here is the wrong URL: https://us-south.functions.cloud.ibm.com/api/v1/web/[email protected]_dev/mypackage/mypackage/categoriaIncluir.json The URL must be like this: https://us-south.functions.cloud.ibm.com/api/v1/web/[email protected]_dev/mypackage/categoriaIncluir.json

The package mypackage is duplicated in the URL.

Below is my serverless.yaml:

service: example-backend

provider:
  name: openwhisk
  runtime: python:3.6

functions:
  categoriaIncluir:
    handler: categoria/incluir_categoria.main
    name: mypackage/categoriaIncluir
    events:
    - http: POST /categoria
    annotations:
      web-export: true
      require-whisk-auth: false
    parameters:
      categoria-db: demo-categoria

resources:
  apigw:
    basepath: /example-demo
  packages:
    mypackage:
      name: mypackage
      parameters:
        cloudantPass: "some value"
        cloudantUser: "some value"
        cloudantUrl: "some value"
plugins:
  - serverless-openwhisk

Here is an example of an API with a wrong URL.

{"operationId":"post-/categoria","responses":{"200":{"description":"A successful invocation response"}},"x-openwhisk":{"action":"categoriaIncluir","namespace":"[email protected]_dev/mypackage","package":"mypackage","url":"https://us-south.functions.cloud.ibm.com/api/v1/web/[email protected]_dev/mypackage/mypackage/categoriaIncluir.json"}}

epiresdasilva avatar May 02 '20 21:05 epiresdasilva