Problem/Motivation
When a view is created with "REST export" and pagination is selected, the pagination links are not created or shown in the JSON output.
Making this issue as a "Feature Request" since this is not a blocker but in long run this will be a must have item.
Steps to Reproduce
- Create a new build in (https://simplytest.me) with latest Drupal RC and Devel module selected.
- Enable the following modules:
- RESTful Web Services
- Serialization
- HTTP Basic Authentication
- HAL
- Devel
- Devel generate
- Generate 50 articles or for other content type. This content type we will use for creating the view.
- Create a Rest Export View like the attached export: EXPORT
- Give permission "Access GET on Content resource" to every user.
- See the resource representation
- If formatted with http://pro.jsonlint.com/ we can see only 5 results are displayed and there is no quick links to navigate to next pages.
Proposed resolution
The resource representation should display pagination links with total count and current page count along with the list of pagination links following Drupal standard. As example,
- If Mini Pager is selected: Show only "Previous" & "Next" links.
- If full pager is selected: Show the same pagination links as it shows in the front end.
Something like: http://phlyrestfully.readthedocs.org/en/latest/halprimer.html#collections
Remaining tasks
- Discuss on IRC about this issue.
- Write patch
- Write tests
- Review
User interface changes
TBD
API changes
TBD
Data model changes
TBD
Comment | File | Size | Author |
---|---|---|---|
views.view_.hal_pagination_test.yml | 5.56 KB | aneek |
Comments
Comment #2
aneek CreditAttribution: aneek as a volunteer commentedComment #3
dawehnerYeah #2100637: REST views: add special handling for collections is basically about that ...