pagination:
type: object
properties:
links:
$ref: '#/page_links'
page_links:
type: object
properties:
pages:
anyOf:
- $ref: '#/forward_links'
- $ref: '#/backward_links'
- {}
example:
pages:
first: "https://api.digitalocean.com/v2/account/keys?page=1"
prev: "https://api.digitalocean.com/v2/account/keys?page=2"
backward_links:
allOf:
- $ref: '#/link_to_first_page'
- $ref: '#/link_to_prev_page'
forward_links:
allOf:
- $ref: '#/link_to_last_page'
- $ref: '#/link_to_next_page'
link_to_first_page:
type: object
properties:
first:
description: URI of the first page of the results.
type: string
example: "https://api.digitalocean.com/v2/images?page=1"
link_to_prev_page:
type: object
properties:
prev:
description: URI of the previous page of the results.
type: string
example: "https://api.digitalocean.com/v2/images?page=1"
link_to_next_page:
type: object
properties:
next:
description: URI of the next page of the results.
type: string
example: "https://api.digitalocean.com/v2/images?page=2"
link_to_last_page:
type: object
properties:
last:
description: URI of the last page of the results.
type: string
example: "https://api.digitalocean.com/v2/images?page=2"