When requesting an endpoint which has pagination, e.g. /v4/top/manga?limit=8&page=1 and if you request it again, then laravel's built in pagination attributes get added.
In every response the "links" and "meta" attributes should be omitted.
All the resource classes currently explicitly exclude the "meta" and "links" attributes and explicitly set "data" and "pagination" attributes for the json response. The caching middlewares should do the same.
Steps To Reproduce
Enable microcaching and caching in the .env file
Startup a jikan instance via containers or simply with php dev server
Make a request to an endpoint with pagination and set the limit parameter to a smaller number than 25.
E.g. http://localhost:8091/v4/top/anime?limit=8&page=1
Refresh several times and check for the attribute names in the root json object of the response.
Environment
- Self-hosting
- Microcaching and caching enabled
- Container environment
- Using roadrunner
Is there an existing issue for this?
Current Behavior
When requesting an endpoint which has pagination, e.g.
/v4/top/manga?limit=8&page=1
and if you request it again, then laravel's built in pagination attributes get added.E.g. first response is:
When this is not cached.
Second response is:
Expected Behavior
In every response the "links" and "meta" attributes should be omitted. All the resource classes currently explicitly exclude the "meta" and "links" attributes and explicitly set "data" and "pagination" attributes for the json response. The caching middlewares should do the same.
Steps To Reproduce
http://localhost:8091/v4/top/anime?limit=8&page=1
Environment
Anything else?
No response