From 13b9fd5f9257d02b85cb5e8df54c6a2495bf48ae Mon Sep 17 00:00:00 2001 From: Vyr Cossont Date: Wed, 13 Mar 2024 04:23:26 -0700 Subject: [bugfix]: Add missing Link headers in Swagger spec (#2751) * Adds Link headers to all endpoints that use it for paging * Fixes the return type for listing what accounts someone follows --- internal/api/client/accounts/followers.go | 4 ++++ internal/api/client/accounts/following.go | 10 +++++++--- internal/api/client/accounts/statuses.go | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'internal/api/client/accounts') diff --git a/internal/api/client/accounts/followers.go b/internal/api/client/accounts/followers.go index bedbcef24..d54fd6084 100644 --- a/internal/api/client/accounts/followers.go +++ b/internal/api/client/accounts/followers.go @@ -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': diff --git a/internal/api/client/accounts/following.go b/internal/api/client/accounts/following.go index 9a8e488b2..1503eddbf 100644 --- a/internal/api/client/accounts/following.go +++ b/internal/api/client/accounts/following.go @@ -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': diff --git a/internal/api/client/accounts/statuses.go b/internal/api/client/accounts/statuses.go index 870a96891..cd93cb74e 100644 --- a/internal/api/client/accounts/statuses.go +++ b/internal/api/client/accounts/statuses.go @@ -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': -- cgit v1.2.3