Add UserOperation to Redoc

This commit is contained in:
Egor Kislitsyn 2021-03-04 21:13:53 +04:00
parent 3aae5231b2
commit 9876fa8e90
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
2 changed files with 13 additions and 12 deletions

View file

@ -92,9 +92,10 @@ defmodule Pleroma.Web.ApiSpec do
"Invites", "Invites",
"MediaProxy cache", "MediaProxy cache",
"OAuth application managment", "OAuth application managment",
"Report managment",
"Relays", "Relays",
"Status administration" "Report managment",
"Status administration",
"User administration"
] ]
}, },
%{"name" => "Applications", "tags" => ["Applications", "Push subscriptions"]}, %{"name" => "Applications", "tags" => ["Applications", "Push subscriptions"]},

View file

@ -17,7 +17,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def index_operation do def index_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "List users", summary: "List users",
operationId: "AdminAPI.UserController.index", operationId: "AdminAPI.UserController.index",
security: [%{"oAuth" => ["admin:read:accounts"]}], security: [%{"oAuth" => ["admin:read:accounts"]}],
@ -63,7 +63,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def create_operation do def create_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Create a single or multiple users", summary: "Create a single or multiple users",
operationId: "AdminAPI.UserController.create", operationId: "AdminAPI.UserController.create",
security: [%{"oAuth" => ["admin:write:accounts"]}], security: [%{"oAuth" => ["admin:write:accounts"]}],
@ -134,7 +134,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def show_operation do def show_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Show user", summary: "Show user",
operationId: "AdminAPI.UserController.show", operationId: "AdminAPI.UserController.show",
security: [%{"oAuth" => ["admin:read:accounts"]}], security: [%{"oAuth" => ["admin:read:accounts"]}],
@ -157,7 +157,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def follow_operation do def follow_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Follow", summary: "Follow",
operationId: "AdminAPI.UserController.follow", operationId: "AdminAPI.UserController.follow",
security: [%{"oAuth" => ["admin:write:follows"]}], security: [%{"oAuth" => ["admin:write:follows"]}],
@ -182,7 +182,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def unfollow_operation do def unfollow_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Unfollow", summary: "Unfollow",
operationId: "AdminAPI.UserController.unfollow", operationId: "AdminAPI.UserController.unfollow",
security: [%{"oAuth" => ["admin:write:follows"]}], security: [%{"oAuth" => ["admin:write:follows"]}],
@ -207,7 +207,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def approve_operation do def approve_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Approve multiple users", summary: "Approve multiple users",
operationId: "AdminAPI.UserController.approve", operationId: "AdminAPI.UserController.approve",
security: [%{"oAuth" => ["admin:write:accounts"]}], security: [%{"oAuth" => ["admin:write:accounts"]}],
@ -239,7 +239,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def toggle_activation_operation do def toggle_activation_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Toggle user activation", summary: "Toggle user activation",
operationId: "AdminAPI.UserController.toggle_activation", operationId: "AdminAPI.UserController.toggle_activation",
security: [%{"oAuth" => ["admin:write:accounts"]}], security: [%{"oAuth" => ["admin:write:accounts"]}],
@ -256,7 +256,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def activate_operation do def activate_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Activate multiple users", summary: "Activate multiple users",
operationId: "AdminAPI.UserController.activate", operationId: "AdminAPI.UserController.activate",
security: [%{"oAuth" => ["admin:write:accounts"]}], security: [%{"oAuth" => ["admin:write:accounts"]}],
@ -288,7 +288,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def deactivate_operation do def deactivate_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Deactivates multiple users", summary: "Deactivates multiple users",
operationId: "AdminAPI.UserController.deactivate", operationId: "AdminAPI.UserController.deactivate",
security: [%{"oAuth" => ["admin:write:accounts"]}], security: [%{"oAuth" => ["admin:write:accounts"]}],
@ -320,7 +320,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.UserOperation do
def delete_operation do def delete_operation do
%Operation{ %Operation{
tags: ["Users"], tags: ["User administration"],
summary: "Removes a single or multiple users", summary: "Removes a single or multiple users",
operationId: "AdminAPI.UserController.delete", operationId: "AdminAPI.UserController.delete",
security: [%{"oAuth" => ["admin:write:accounts"]}], security: [%{"oAuth" => ["admin:write:accounts"]}],