Skip to content

Commit

Permalink
Revision to for null value on last page
Browse files Browse the repository at this point in the history
Following discussion #165, suggestion adds a explicit requirement for the last page of any paginated payload to return a value of `null` for the `next` key.
  • Loading branch information
black-tea authored Nov 8, 2018
1 parent f633bb3 commit 1846ff3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ MDS defines [JSON Schema](https://json-schema.org/) files for [`trips`][trips-sc

### Pagination

`provider` APIs may decide to paginate the data payload. If so, pagination must comply with the [JSON API](http://jsonapi.org/format/#fetching-pagination) specification.
`provider` APIs may decide to paginate the data payload. If so, pagination must comply with the [JSON API](http://jsonapi.org/format/#fetching-pagination) specification.

The following keys must be used for pagination links:

Expand All @@ -48,7 +48,7 @@ The following keys must be used for pagination links:
* `prev`: url to the previous page of data
* `next`: url to the next page of data

At a minimum, paginated payloads must include a `next` key.
At a minimum, paginated payloads must include a `next` key, which must be set to `null` to indicate the last page of data.

```json
{
Expand Down

0 comments on commit 1846ff3

Please sign in to comment.