From 3ab2d8621b9d6bca1739eec93fd8ce885185a5bc Mon Sep 17 00:00:00 2001 From: Vyr Cossont Date: Sun, 26 Jan 2025 00:51:28 -0800 Subject: [PATCH] [docs] Swagger: fix filter context params by moving enum list from the list type to the item type (#3684) Reported by `@modulus:matrix.org` --- docs/api/swagger.yaml | 48 ++++++++++---------- internal/api/client/filters/v1/filterpost.go | 12 ++--- internal/api/client/filters/v1/filterput.go | 12 ++--- internal/api/client/filters/v2/filterpost.go | 12 ++--- internal/api/client/filters/v2/filterput.go | 12 ++--- 5 files changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 5165f8c9e..d95825b6e 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -7954,14 +7954,14 @@ paths: The contexts in which the filter should be applied. Sample: home, public - enum: - - home - - notifications - - public - - thread - - account in: formData items: + enum: + - home + - notifications + - public + - thread + - account type: string minItems: 1 name: context[] @@ -8108,14 +8108,14 @@ paths: The contexts in which the filter should be applied. Sample: home, public - enum: - - home - - notifications - - public - - thread - - account in: formData items: + enum: + - home + - notifications + - public + - thread + - account type: string minItems: 1 name: context[] @@ -11835,14 +11835,14 @@ paths: The contexts in which the filter should be applied. Sample: home, public - enum: - - home - - notifications - - public - - thread - - account in: formData items: + enum: + - home + - notifications + - public + - thread + - account type: string minItems: 1 name: context[] @@ -12029,14 +12029,14 @@ paths: The contexts in which the filter should be applied. Sample: home, public - enum: - - home - - notifications - - public - - thread - - account in: formData items: + enum: + - home + - notifications + - public + - thread + - account type: string minItems: 1 name: context[] diff --git a/internal/api/client/filters/v1/filterpost.go b/internal/api/client/filters/v1/filterpost.go index 95a810f8b..a58f2273d 100644 --- a/internal/api/client/filters/v1/filterpost.go +++ b/internal/api/client/filters/v1/filterpost.go @@ -63,16 +63,16 @@ // The contexts in which the filter should be applied. // // Sample: home, public -// enum: -// - home -// - notifications -// - public -// - thread -// - account // type: array // items: // type: // string +// enum: +// - home +// - notifications +// - public +// - thread +// - account // collectionFormat: multi // minItems: 1 // uniqueItems: true diff --git a/internal/api/client/filters/v1/filterput.go b/internal/api/client/filters/v1/filterput.go index 60915624e..edaf8104d 100644 --- a/internal/api/client/filters/v1/filterput.go +++ b/internal/api/client/filters/v1/filterput.go @@ -69,16 +69,16 @@ // The contexts in which the filter should be applied. // // Sample: home, public -// enum: -// - home -// - notifications -// - public -// - thread -// - account // type: array // items: // type: // string +// enum: +// - home +// - notifications +// - public +// - thread +// - account // collectionFormat: multi // minItems: 1 // uniqueItems: true diff --git a/internal/api/client/filters/v2/filterpost.go b/internal/api/client/filters/v2/filterpost.go index ad6e83060..5e87df617 100644 --- a/internal/api/client/filters/v2/filterpost.go +++ b/internal/api/client/filters/v2/filterpost.go @@ -65,16 +65,16 @@ // The contexts in which the filter should be applied. // // Sample: home, public -// enum: -// - home -// - notifications -// - public -// - thread -// - account // type: array // items: // type: // string +// enum: +// - home +// - notifications +// - public +// - thread +// - account // collectionFormat: multi // minItems: 1 // uniqueItems: true diff --git a/internal/api/client/filters/v2/filterput.go b/internal/api/client/filters/v2/filterput.go index 9c1b56dd6..58d3f4a22 100644 --- a/internal/api/client/filters/v2/filterput.go +++ b/internal/api/client/filters/v2/filterput.go @@ -98,16 +98,16 @@ // The contexts in which the filter should be applied. // // Sample: home, public -// enum: -// - home -// - notifications -// - public -// - thread -// - account // type: array // items: // type: // string +// enum: +// - home +// - notifications +// - public +// - thread +// - account // collectionFormat: multi // minItems: 1 // uniqueItems: true