diff options
author | feld <feld@feld.me> | 2024-01-30 20:32:32 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2024-01-30 20:32:32 +0000 |
commit | 1bba02863d02583f508fcf0787edd789aa34ef6f (patch) | |
tree | b006fc685b71dfc8b16f6434a17095b720e93c19 /lib/pleroma/web/api_spec/operations/admin | |
parent | 251c455b9129b328d3266cc3d68434b0d879f864 (diff) | |
parent | cfe7438b2f953575eb0cb9e8318f0c39bcad35c6 (diff) | |
download | pleroma-1bba02863d02583f508fcf0787edd789aa34ef6f.tar.gz pleroma-1bba02863d02583f508fcf0787edd789aa34ef6f.zip |
Merge branch 'dialyzer-fixes' into 'develop'
Dialyzer fixes, some reverts
See merge request pleroma/pleroma!4049
Diffstat (limited to 'lib/pleroma/web/api_spec/operations/admin')
7 files changed, 32 insertions, 32 deletions
diff --git a/lib/pleroma/web/api_spec/operations/admin/config_operation.ex b/lib/pleroma/web/api_spec/operations/admin/config_operation.ex index c528cacf2..487dd5cda 100644 --- a/lib/pleroma/web/api_spec/operations/admin/config_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/config_operation.ex @@ -47,7 +47,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ConfigOperation do request_body("Parameters", %Schema{ type: :object, properties: %{ - "configs" => %Schema{ + configs: %Schema{ type: :array, items: %Schema{ type: :object, diff --git a/lib/pleroma/web/api_spec/operations/admin/instance_document_operation.ex b/lib/pleroma/web/api_spec/operations/admin/instance_document_operation.ex index b2a1ba8ad..fc0de499b 100644 --- a/lib/pleroma/web/api_spec/operations/admin/instance_document_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/instance_document_operation.ex @@ -61,9 +61,9 @@ defmodule Pleroma.Web.ApiSpec.Admin.InstanceDocumentOperation do title: "UpdateRequest", description: "POST body for uploading the file", type: :object, - required: ["file"], + required: [:file], properties: %{ - "file" => %Schema{ + file: %Schema{ type: :string, format: :binary, description: "The file to be uploaded, using multipart form data." diff --git a/lib/pleroma/web/api_spec/operations/admin/invite_operation.ex b/lib/pleroma/web/api_spec/operations/admin/invite_operation.ex index 3b084f3b8..e4a9ffaeb 100644 --- a/lib/pleroma/web/api_spec/operations/admin/invite_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/invite_operation.ex @@ -79,9 +79,9 @@ defmodule Pleroma.Web.ApiSpec.Admin.InviteOperation do "Parameters", %Schema{ type: :object, - required: ["token"], + required: [:token], properties: %{ - "token" => %Schema{type: :string} + token: %Schema{type: :string} } }, required: true @@ -106,10 +106,10 @@ defmodule Pleroma.Web.ApiSpec.Admin.InviteOperation do "Parameters", %Schema{ type: :object, - required: ["email"], + required: [:email], properties: %{ - "email" => %Schema{type: :string, format: :email}, - "name" => %Schema{type: :string} + email: %Schema{type: :string, format: :email}, + name: %Schema{type: :string} } }, required: true diff --git a/lib/pleroma/web/api_spec/operations/admin/media_proxy_cache_operation.ex b/lib/pleroma/web/api_spec/operations/admin/media_proxy_cache_operation.ex index 79363d4cd..0b1eb3946 100644 --- a/lib/pleroma/web/api_spec/operations/admin/media_proxy_cache_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/media_proxy_cache_operation.ex @@ -78,9 +78,9 @@ defmodule Pleroma.Web.ApiSpec.Admin.MediaProxyCacheOperation do "Parameters", %Schema{ type: :object, - required: ["urls"], + required: [:urls], properties: %{ - "urls" => %Schema{type: :array, items: %Schema{type: :string, format: :uri}} + urls: %Schema{type: :array, items: %Schema{type: :string, format: :uri}} } }, required: true @@ -104,10 +104,10 @@ defmodule Pleroma.Web.ApiSpec.Admin.MediaProxyCacheOperation do "Parameters", %Schema{ type: :object, - required: ["urls"], + required: [:urls], properties: %{ - "urls" => %Schema{type: :array, items: %Schema{type: :string, format: :uri}}, - "ban" => %Schema{type: :boolean, default: true} + urls: %Schema{type: :array, items: %Schema{type: :string, format: :uri}}, + ban: %Schema{type: :boolean, default: true} } }, required: true diff --git a/lib/pleroma/web/api_spec/operations/admin/relay_operation.ex b/lib/pleroma/web/api_spec/operations/admin/relay_operation.ex index ca9080fb3..8b241bd49 100644 --- a/lib/pleroma/web/api_spec/operations/admin/relay_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/relay_operation.ex @@ -87,7 +87,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.RelayOperation do %Schema{ type: :object, properties: %{ - "relay_url" => %Schema{type: :string, format: :uri} + relay_url: %Schema{type: :string, format: :uri} } } end @@ -96,8 +96,8 @@ defmodule Pleroma.Web.ApiSpec.Admin.RelayOperation do %Schema{ type: :object, properties: %{ - "relay_url" => %Schema{type: :string, format: :uri}, - "force" => %Schema{type: :boolean, default: false} + relay_url: %Schema{type: :string, format: :uri}, + force: %Schema{type: :boolean, default: false} } } end diff --git a/lib/pleroma/web/api_spec/operations/admin/report_operation.ex b/lib/pleroma/web/api_spec/operations/admin/report_operation.ex index 3902f12f1..fbb6896a9 100644 --- a/lib/pleroma/web/api_spec/operations/admin/report_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/report_operation.ex @@ -107,7 +107,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do request_body("Parameters", %Schema{ type: :object, properties: %{ - "content" => %Schema{type: :string, description: "The message"} + content: %Schema{type: :string, description: "The message"} } }), security: [%{"oAuth" => ["admin:write:reports"]}], @@ -141,7 +141,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do end def id_param do - Operation.parameter(:id, :path, FlakeID, "Report ID", + Operation.parameter(:id, :path, FlakeID.schema(), "Report ID", example: "9umDrYheeY451cQnEe", required: true ) @@ -199,9 +199,9 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do defp update_request do %Schema{ type: :object, - required: ["reports"], + required: [:reports], properties: %{ - "reports" => %Schema{ + reports: %Schema{ type: :array, items: %Schema{ type: :object, diff --git a/lib/pleroma/web/api_spec/operations/admin/user_operation.ex b/lib/pleroma/web/api_spec/operations/admin/user_operation.ex index 49f5a4786..a5179ac39 100644 --- a/lib/pleroma/web/api_spec/operations/admin/user_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/user_operation.ex @@ -50,7 +50,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do %Schema{ type: :object, properties: %{ - "users" => %Schema{type: :array, items: user()}, + users: %Schema{type: :array, items: user()}, count: %Schema{type: :integer}, page_size: %Schema{type: :integer} } @@ -75,7 +75,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do description: "POST body for creating users", type: :object, properties: %{ - "users" => %Schema{ + users: %Schema{ type: :array, items: %Schema{ type: :object, @@ -168,8 +168,8 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do %Schema{ type: :object, properties: %{ - "follower" => %Schema{type: :string, description: "Follower nickname"}, - "followed" => %Schema{type: :string, description: "Followed nickname"} + follower: %Schema{type: :string, description: "Follower nickname"}, + followed: %Schema{type: :string, description: "Followed nickname"} } } ), @@ -193,8 +193,8 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do %Schema{ type: :object, properties: %{ - "follower" => %Schema{type: :string, description: "Follower nickname"}, - "followed" => %Schema{type: :string, description: "Followed nickname"} + follower: %Schema{type: :string, description: "Follower nickname"}, + followed: %Schema{type: :string, description: "Followed nickname"} } } ), @@ -219,7 +219,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do description: "POST body for approving multiple users", type: :object, properties: %{ - "nicknames" => %Schema{ + nicknames: %Schema{ type: :array, items: %Schema{type: :string} } @@ -251,7 +251,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do description: "POST body for adding multiple suggested users", type: :object, properties: %{ - "nicknames" => %Schema{ + nicknames: %Schema{ type: :array, items: %Schema{type: :string} } @@ -283,7 +283,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do description: "POST body for removing multiple suggested users", type: :object, properties: %{ - "nicknames" => %Schema{ + nicknames: %Schema{ type: :array, items: %Schema{type: :string} } @@ -332,7 +332,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do description: "POST body for deleting multiple users", type: :object, properties: %{ - "nicknames" => %Schema{ + nicknames: %Schema{ type: :array, items: %Schema{type: :string} } @@ -364,7 +364,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do description: "POST body for deleting multiple users", type: :object, properties: %{ - "nicknames" => %Schema{ + nicknames: %Schema{ type: :array, items: %Schema{type: :string} } @@ -404,7 +404,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do description: "POST body for deleting multiple users", type: :object, properties: %{ - "nicknames" => %Schema{ + nicknames: %Schema{ type: :array, items: %Schema{type: :string} } |