kong icon indicating copy to clipboard operation
kong copied to clipboard

Admin API query parameter `size` is not reported in the `next` URL in paginated lists

Open Teudimundo opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Kong version ($ kong version)

2.1.8

Current Behavior

When doing the following request:

GET http://localhost:8001/services?tags=test&size=1

The response contains a single item as expected by the size argument (I could not find it documented in the Kong Admin API, anyway)

but in the next field the contained URL is:

"next": "/services?offset=WyIzZWQ2N2EwMC1mNGY2LTQ4NTUtYmQ0Yi0zMmZmMWMzNWVmNmMiXQ&tags=test" 

the tags parameter is present, but size is missing.

Expected Behavior

The size parameter should have been present so that the pagination will keep respecting the size the user requested:

"next": "/services?offset=WyIzZWQ2N2EwMC1mNGY2LTQ4NTUtYmQ0Yi0zMmZmMWMzNWVmNmMiXQ&tags=test" 

Steps To Reproduce

1. Do the request: `GET http://localhost:8001/services?tags=test&size=1`
2. Verify that the `next` field in the response lacks the `size` parameter

Anything else?

No response

Teudimundo avatar Jun 29 '22 07:06 Teudimundo