shell icon indicating copy to clipboard operation
shell copied to clipboard

cannot create api with path parameters

Open rabbah opened this issue 7 years ago • 0 comments

Trying to follow the book API example https://github.com/apache/incubator-openwhisk/blob/master/docs/apigateway.md#exposing-multiple-web-actions

> fsh api create -n "Book Club" /club /books/{isbn} get getBooks --response-type http
API creation failure: The action must use a response type of '.http' in order to receive the path parameters

I'm using this action as a mock of getBooks

function main({name:name='Serverless API'}) {
    return {
      body: {payload:`Hello world ${name}`},
      statusCode: 200,
      headers:{ 'Content-Type': 'application/json'}
    };
}

rabbah avatar Jun 14 '18 00:06 rabbah