apache / apache/openwhisk

api gateway example not consistent with observed behavior

Open
#3,763 3 comments 0 reactions 0 assignees View on GitHub
apigw
Dominant language
Scala
Stars
6.8k
Forks
1.2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

I'm following the documented example here: https://github.com/apache/incubator-openwhisk/blob/master/docs/apigateway.md#exposing-multiple-web-actions and after creating the the API

```
wsk api create -n "Book Club" /club /books/{isbn} get getBooks --response-type http
wsk api create /club /books get getBooks --response-type http
wsk api create /club /books post postBooks --response-type http
wsk api create /club /books/{isbn} put putBooks --response-type http
wsk api create /club /books/{isbn} delete deleteBooks --response-type http
```

The `wsk api list /club -f` does not return `API Name: Book Club`. Here is the actual response:

```
Action: /guest/deleteBooks
API Name: /club
Base path: /club
Path: /books/{isbn}
Verb: delete
URL: http://172.17.0.1:9001/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/club/books/{isbn}
Action: /guest/getBooks
API Name: /club
Base path: /club
Path: /books/{isbn}
Verb: get
URL: http://172.17.0.1:9001/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/club/books/{isbn}
Action: /guest/putBooks
API Name: /club
Base path: /club
Path: /books/{isbn}
Verb: put
URL: http://172.17.0.1:9001/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/club/books/{isbn}
Action: /guest/getBooks
API Name: /club
Base path: /club
Path: /books
Verb: get
URL: http://172.17.0.1:9001/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/club/books
Action: /guest/postBooks
API Name: /club
Base path: /club
Path: /books
Verb: post
URL: http://172.17.0.1:9001/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/club/books
```

which makes this next step in the tutorial invalid:

```
wsk api get "Book Club" > club-swagger.json
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.