Swagger: add Link header to all endpoints that use it for paging

This commit is contained in:
Vyr Cossont 2024-03-12 16:14:19 -07:00
parent c27049ad15
commit de6ac32445
6 changed files with 47 additions and 3 deletions

View file

@ -2907,6 +2907,10 @@ paths:
responses:
"200":
description: Array of accounts that follow this account.
headers:
Link:
description: Links to the next and previous queries.
type: string
schema:
items:
$ref: '#/definitions/account'
@ -2967,6 +2971,14 @@ paths:
responses:
"200":
description: Array of accounts that are followed by this account.
headers:
Link:
description: Links to the next and previous queries.
type: string
schema:
items:
$ref: '#/definitions/account'
type: array
"400":
description: bad request
"401":
@ -3109,6 +3121,10 @@ paths:
responses:
"200":
description: Array of statuses.
headers:
Link:
description: Links to the next and previous queries.
type: string
schema:
items:
$ref: '#/definitions/status'
@ -4875,6 +4891,10 @@ paths:
responses:
"200":
description: Array of reports.
headers:
Link:
description: Links to the next and previous queries.
type: string
schema:
items:
$ref: '#/definitions/adminReport'
@ -6614,6 +6634,10 @@ paths:
responses:
"200":
description: Array of reports.
headers:
Link:
description: Links to the next and previous queries.
type: string
schema:
items:
$ref: '#/definitions/report'

View file

@ -102,6 +102,10 @@ import (
// type: array
// items:
// "$ref": "#/definitions/account"
// headers:
// Link:
// type: string
// description: Links to the next and previous queries.
// '400':
// description: bad request
// '401':

View file

@ -99,9 +99,13 @@ import (
// name: accounts
// description: Array of accounts that are followed by this account.
// schema:
// type: array
// items:
// "$ref": "#/definitions/account"
// type: array
// items:
// "$ref": "#/definitions/account"
// headers:
// Link:
// type: string
// description: Links to the next and previous queries.
// '400':
// description: bad request
// '401':

View file

@ -119,6 +119,10 @@ import (
// type: array
// items:
// "$ref": "#/definitions/status"
// headers:
// Link:
// type: string
// description: Links to the next and previous queries.
// '400':
// description: bad request
// '401':

View file

@ -112,6 +112,10 @@ import (
// type: array
// items:
// "$ref": "#/definitions/adminReport"
// headers:
// Link:
// type: string
// description: Links to the next and previous queries.
// '400':
// description: bad request
// '401':

View file

@ -108,6 +108,10 @@ import (
// type: array
// items:
// "$ref": "#/definitions/report"
// headers:
// Link:
// type: string
// description: Links to the next and previous queries.
// '400':
// description: bad request
// '401':