-
Notifications
You must be signed in to change notification settings - Fork 367
Open
Description
Issue
The GET /v3/apps/:guid/features endpoint "pretends" to support pagination - it returns a pagination object. But neither per_page nor order_by are working. Also the first and last links are incorrect.
Context
No response
Steps to Reproduce
No response
Expected Result
With pagination removed:
{
"resources": [
{
"name": "ssh",
"description": "Enable SSHing into the app.",
"enabled": true
},
{
"name": "revisions",
"description": "Enable versioning of an application",
"enabled": true
},
{
"name": "service-binding-k8s",
"description": "Enable k8s service bindings for the app",
"enabled": true
},
{
"name": "file-based-vcap-services",
"description": "Enable file-based VCAP service bindings for the app",
"enabled": false
}
]
}
With pagination removed and links added:
{
"resources": [
{
"name": "ssh",
"description": "Enable SSHing into the app.",
"enabled": true
},
{
"name": "revisions",
"description": "Enable versioning of an application",
"enabled": true
},
{
"name": "service-binding-k8s",
"description": "Enable k8s service bindings for the app",
"enabled": true
},
{
"name": "file-based-vcap-services",
"description": "Enable file-based VCAP service bindings for the app",
"enabled": false
}
],
"links": {
"self": {
"href": "https://api.example.org/v3/apps/b832f30f-bd3c-47a4-9192-1194835ef854/features"
},
"app": {
"href": "https://api.example.org/v3/apps/b832f30f-bd3c-47a4-9192-1194835ef854"
}
}
}
Current Result
{
"resources": [
{
"name": "ssh",
"description": "Enable SSHing into the app.",
"enabled": true
},
{
"name": "revisions",
"description": "Enable versioning of an application",
"enabled": true
},
{
"name": "service-binding-k8s",
"description": "Enable k8s service bindings for the app",
"enabled": true
},
{
"name": "file-based-vcap-services",
"description": "Enable file-based VCAP service bindings for the app",
"enabled": false
}
],
"pagination": {
"total_results": 4,
"total_pages": 1,
"first": {
"href": "/v3/apps/b832f30f-bd3c-47a4-9192-1194835ef854/features"
},
"last": {
"href": "/v3/apps/b832f30f-bd3c-47a4-9192-1194835ef854/features"
},
"next": null,
"previous": null
}
}
Possible Fix
I'm proposing to remove pagination from the response and maybe(?) add links instead (like it's done for GET /v3/apps/:guid/environment_variables).
Metadata
Metadata
Assignees
Labels
No labels