mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(api): 🐛 Add tags to all API routes that were missing one
This commit is contained in:
parent
d75254fc71
commit
cd4cfa6a70
|
|
@ -19,6 +19,7 @@ const route = createRoute({
|
||||||
summary: "OAuth Code flow",
|
summary: "OAuth Code flow",
|
||||||
description:
|
description:
|
||||||
"Redirects to the application, or back to login if the code is invalid",
|
"Redirects to the application, or back to login if the code is invalid",
|
||||||
|
tags: ["OpenID"],
|
||||||
responses: {
|
responses: {
|
||||||
302: {
|
302: {
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ const routeDelete = createRoute({
|
||||||
method: "delete",
|
method: "delete",
|
||||||
path: "/api/v1/accounts/{id}/roles/{role_id}",
|
path: "/api/v1/accounts/{id}/roles/{role_id}",
|
||||||
summary: "Remove role from user",
|
summary: "Remove role from user",
|
||||||
|
tags: ["Accounts"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ const route = createRoute({
|
||||||
summary: "Lookup account ID from Webfinger address",
|
summary: "Lookup account ID from Webfinger address",
|
||||||
description:
|
description:
|
||||||
"Quickly lookup a username to see if it is available, skipping WebFinger resolution.",
|
"Quickly lookup a username to see if it is available, skipping WebFinger resolution.",
|
||||||
|
tags: ["Accounts"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: false,
|
auth: false,
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ const route = createRoute({
|
||||||
path: "/api/v1/emojis",
|
path: "/api/v1/emojis",
|
||||||
summary: "Upload emoji",
|
summary: "Upload emoji",
|
||||||
description: "Upload a new emoji to the server.",
|
description: "Upload a new emoji to the server.",
|
||||||
|
tags: ["Emojis"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ const route = createRoute({
|
||||||
method: "delete",
|
method: "delete",
|
||||||
path: "/api/v1/notifications/destroy_multiple",
|
path: "/api/v1/notifications/destroy_multiple",
|
||||||
summary: "Dismiss multiple notifications",
|
summary: "Dismiss multiple notifications",
|
||||||
|
tags: ["Notifications"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ const route = createRoute({
|
||||||
externalDocs: {
|
externalDocs: {
|
||||||
url: "https://docs.joinmastodon.org/methods/notifications/#get",
|
url: "https://docs.joinmastodon.org/methods/notifications/#get",
|
||||||
},
|
},
|
||||||
|
tags: ["Notifications"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ const routeGet = createRoute({
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/api/v1/roles/{id}",
|
path: "/api/v1/roles/{id}",
|
||||||
summary: "Get role data",
|
summary: "Get role data",
|
||||||
|
tags: ["Roles"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
@ -37,6 +38,7 @@ const routePatch = createRoute({
|
||||||
method: "patch",
|
method: "patch",
|
||||||
path: "/api/v1/roles/{id}",
|
path: "/api/v1/roles/{id}",
|
||||||
summary: "Update role data",
|
summary: "Update role data",
|
||||||
|
tags: ["Roles"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
@ -68,6 +70,7 @@ const routeDelete = createRoute({
|
||||||
method: "delete",
|
method: "delete",
|
||||||
path: "/api/v1/roles/{id}",
|
path: "/api/v1/roles/{id}",
|
||||||
summary: "Delete role",
|
summary: "Delete role",
|
||||||
|
tags: ["Roles"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ const routeGet = createRoute({
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/api/v1/roles",
|
path: "/api/v1/roles",
|
||||||
summary: "Get all roles",
|
summary: "Get all roles",
|
||||||
|
tags: ["Roles"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
@ -30,6 +31,7 @@ const routePost = createRoute({
|
||||||
method: "post",
|
method: "post",
|
||||||
path: "/api/v1/roles",
|
path: "/api/v1/roles",
|
||||||
summary: "Create a new role",
|
summary: "Create a new role",
|
||||||
|
tags: ["Roles"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ const route = createRoute({
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/.well-known/openid-configuration",
|
path: "/.well-known/openid-configuration",
|
||||||
summary: "OpenID Configuration",
|
summary: "OpenID Configuration",
|
||||||
|
tags: ["OpenID"],
|
||||||
responses: {
|
responses: {
|
||||||
200: {
|
200: {
|
||||||
description: "OpenID Configuration",
|
description: "OpenID Configuration",
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ export default (plugin: PluginType): void =>
|
||||||
{
|
{
|
||||||
method: "post",
|
method: "post",
|
||||||
path: "/oauth/authorize",
|
path: "/oauth/authorize",
|
||||||
|
tags: ["OpenID"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: false,
|
auth: false,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/.well-known/jwks",
|
path: "/.well-known/jwks",
|
||||||
summary: "JWK Set",
|
summary: "JWK Set",
|
||||||
|
tags: ["OpenID"],
|
||||||
responses: {
|
responses: {
|
||||||
200: {
|
200: {
|
||||||
description: "JWK Set",
|
description: "JWK Set",
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/oauth/sso/{issuer}/callback",
|
path: "/oauth/sso/{issuer}/callback",
|
||||||
summary: "SSO callback",
|
summary: "SSO callback",
|
||||||
|
tags: ["OpenID"],
|
||||||
description:
|
description:
|
||||||
"After the user has authenticated to an external OpenID provider, they are redirected here to complete the OAuth flow and get a code",
|
"After the user has authenticated to an external OpenID provider, they are redirected here to complete the OAuth flow and get a code",
|
||||||
middleware: [plugin.middleware] as const,
|
middleware: [plugin.middleware] as const,
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "post",
|
method: "post",
|
||||||
path: "/oauth/revoke",
|
path: "/oauth/revoke",
|
||||||
summary: "Revoke token",
|
summary: "Revoke token",
|
||||||
|
tags: ["OpenID"],
|
||||||
middleware: [jsonOrForm(), plugin.middleware],
|
middleware: [jsonOrForm(), plugin.middleware],
|
||||||
request: {
|
request: {
|
||||||
body: {
|
body: {
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/oauth/sso",
|
path: "/oauth/sso",
|
||||||
summary: "Initiate SSO login flow",
|
summary: "Initiate SSO login flow",
|
||||||
|
tags: ["OpenID"],
|
||||||
request: {
|
request: {
|
||||||
query: schemas.query,
|
query: schemas.query,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "post",
|
method: "post",
|
||||||
path: "/oauth/token",
|
path: "/oauth/token",
|
||||||
summary: "Get token",
|
summary: "Get token",
|
||||||
|
tags: ["OpenID"],
|
||||||
middleware: [jsonOrForm(), plugin.middleware],
|
middleware: [jsonOrForm(), plugin.middleware],
|
||||||
request: {
|
request: {
|
||||||
body: {
|
body: {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/api/v1/sso/{id}",
|
path: "/api/v1/sso/{id}",
|
||||||
summary: "Get linked account",
|
summary: "Get linked account",
|
||||||
|
tags: ["SSO"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
@ -93,6 +94,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "delete",
|
method: "delete",
|
||||||
path: "/api/v1/sso/{id}",
|
path: "/api/v1/sso/{id}",
|
||||||
summary: "Unlink account",
|
summary: "Unlink account",
|
||||||
|
tags: ["SSO"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/api/v1/sso",
|
path: "/api/v1/sso",
|
||||||
summary: "Get linked accounts",
|
summary: "Get linked accounts",
|
||||||
|
tags: ["SSO"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
@ -65,6 +66,7 @@ export default (plugin: PluginType): void => {
|
||||||
method: "post",
|
method: "post",
|
||||||
path: "/api/v1/sso",
|
path: "/api/v1/sso",
|
||||||
summary: "Link account",
|
summary: "Link account",
|
||||||
|
tags: ["SSO"],
|
||||||
middleware: [
|
middleware: [
|
||||||
auth({
|
auth({
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue