phalcon / phalcon/rest-api

Introduce Pagination

Open
#15 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
93
Forks
34
PR merge metrics
No merged PRs in 30d

Description

  • A server MAY choose to limit the number of resources returned in a response to a subset (“page”) of the whole set available.
  • A server MAY provide links to traverse a paginated data set (“pagination links”).
  • Pagination links MUST appear in the links object that corresponds to a collection. To paginate the primary data, supply pagination links in the top-level links object. To paginate an included collection returned in a compound document, supply pagination links in the corresponding links object.
  • The following keys MUST be used for pagination links:
  • first: the first page of data
  • last: the last page of data
  • prev: the previous page of data
  • next: the next page of data
  • Keys MUST either be omitted or have a null value to indicate that a particular link is unavailable.
  • Concepts of order, as expressed in the naming of pagination links, MUST remain consistent with JSON API’s sorting rules.
  • The page query parameter is reserved for pagination. Servers and clients SHOULD use this key for
  • Introduction of page based pagination.
  • Introduction of page chunk size (config)
  • page[number] is to be used

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the collection response and query-parameter handling, then compare them with the pagination requirements in the issue. Done means page numbering and configurable page size work, with the specified first, last, prev, and next links and null or omitted unavailable links.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.