REST API response for list package and get package has different definition for "binding", they should keep consistent otherwise we can't use the same model class for both API calls.
- Dominant language
- Scala
- Stars
- 6.8k
- Forks
- 1.2k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 2
Description
REST API response for list package and get package has different definition for "binding", they should keep consistent otherwise we can't use the same model class for both API calls.
## Environment details:
Bluemix OpenWhisk
## Steps to reproduce the issue:
1. Create a package
2. Run `wsk -v package list`, this should give you a list of packages defined in the system
3. Run `wsk -v package get ` to get details of a specific package
4. Compare the result, you should see the attribute `binding` is a boolean in package list and it is an object in package detail
## Provide the expected results and outputs:
The type of attribute `binding` needs to be consistent in both API call
## Provide the actual results and outputs:
### sample for package list
```
[{
"name": "package_messagehub_myenv",
"binding": true,
"publish": false,
"annotations": [{
"key": "binding",
"value": {
"namespace": "whisk.system",
"name": "messaging"
}
}],
"version": "0.0.1",
"namespace": "Entity_discovery_dev"
}, {
"name": "MyPackage",
"binding": true,
"publish": false,
"annotations": [{
"key": "binding",
"value": {
"namespace": "whisk.system",
"name": "messaging"
}
}],
"version": "0.0.1",
"namespace": "Entity_discovery_dev"
}]
```
### Sample for package detail
```
{
"namespace": "Entity_discovery_dev",
"name": "MyPackage",
"version": "0.0.1",
"publish": false,
"binding": {
"namespace": "whisk.system",
"name": "messaging"
},
...
}
```
Contributor guide
Research direction
Start by reproducing the mismatch with `wsk -v package list` and `wsk -v package get `, then trace the REST API entry points and package response models used by each call. Done means both responses use the same type for `binding`, with tests covering package list and package detail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100