From 8e69511e3ed3e8e2b69d30638682657adb878406 Mon Sep 17 00:00:00 2001 From: Divlo Date: Mon, 29 Aug 2022 17:37:00 +0000 Subject: [PATCH] docs: add `oauth2` tag --- generators/service/index.js | 2 +- src/services/users/oauth2/[provider]/delete.ts | 2 +- src/services/users/oauth2/discord/add-strategy/get.ts | 2 +- src/services/users/oauth2/discord/callback-add-strategy/get.ts | 2 +- src/services/users/oauth2/discord/callback/get.ts | 2 +- src/services/users/oauth2/discord/signin/get.ts | 2 +- src/services/users/oauth2/github/add-strategy/get.ts | 2 +- src/services/users/oauth2/github/callback-add-strategy/get.ts | 2 +- src/services/users/oauth2/github/callback/get.ts | 2 +- src/services/users/oauth2/github/signin/get.ts | 2 +- src/services/users/oauth2/google/add-strategy/get.ts | 2 +- src/services/users/oauth2/google/callback-add-strategy/get.ts | 2 +- src/services/users/oauth2/google/callback/get.ts | 2 +- src/services/users/oauth2/google/signin/get.ts | 2 +- src/tools/configurations/swaggerOptions.ts | 1 + 15 files changed, 15 insertions(+), 14 deletions(-) diff --git a/generators/service/index.js b/generators/service/index.js index 3a6a13b..7ca2f1f 100644 --- a/generators/service/index.js +++ b/generators/service/index.js @@ -22,7 +22,7 @@ export const serviceGenerator = { type: 'list', name: 'tag', message: 'tag', - choices: ['users', 'guilds', 'channels', 'messages', 'members'] + choices: ['users', 'oauth2', 'guilds', 'channels', 'messages', 'members'] }, { type: 'confirm', diff --git a/src/services/users/oauth2/[provider]/delete.ts b/src/services/users/oauth2/[provider]/delete.ts index 24d0e1d..3134f48 100644 --- a/src/services/users/oauth2/[provider]/delete.ts +++ b/src/services/users/oauth2/[provider]/delete.ts @@ -14,7 +14,7 @@ type Parameters = Static const deleteServiceSchema: FastifySchema = { description: 'DELETE a provider to authenticate with for a user.', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], security: [ { bearerAuth: [] diff --git a/src/services/users/oauth2/discord/add-strategy/get.ts b/src/services/users/oauth2/discord/add-strategy/get.ts index 8b40185..7c2a981 100644 --- a/src/services/users/oauth2/discord/add-strategy/get.ts +++ b/src/services/users/oauth2/discord/add-strategy/get.ts @@ -14,7 +14,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'Discord OAuth2 - add-strategy', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], security: [ { bearerAuth: [] diff --git a/src/services/users/oauth2/discord/callback-add-strategy/get.ts b/src/services/users/oauth2/discord/callback-add-strategy/get.ts index 9e65e0f..1801ef3 100644 --- a/src/services/users/oauth2/discord/callback-add-strategy/get.ts +++ b/src/services/users/oauth2/discord/callback-add-strategy/get.ts @@ -17,7 +17,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'Discord OAuth2 - callback-add-strategy', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/services/users/oauth2/discord/callback/get.ts b/src/services/users/oauth2/discord/callback/get.ts index 2d6cdf9..e651126 100644 --- a/src/services/users/oauth2/discord/callback/get.ts +++ b/src/services/users/oauth2/discord/callback/get.ts @@ -15,7 +15,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'Discord OAuth2 - callback', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/services/users/oauth2/discord/signin/get.ts b/src/services/users/oauth2/discord/signin/get.ts index 6fada51..c6c310c 100644 --- a/src/services/users/oauth2/discord/signin/get.ts +++ b/src/services/users/oauth2/discord/signin/get.ts @@ -13,7 +13,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'Discord OAuth2 - signin', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/services/users/oauth2/github/add-strategy/get.ts b/src/services/users/oauth2/github/add-strategy/get.ts index 757c7b4..818e989 100644 --- a/src/services/users/oauth2/github/add-strategy/get.ts +++ b/src/services/users/oauth2/github/add-strategy/get.ts @@ -14,7 +14,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'GitHub OAuth2 - add-strategy', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], security: [ { bearerAuth: [] diff --git a/src/services/users/oauth2/github/callback-add-strategy/get.ts b/src/services/users/oauth2/github/callback-add-strategy/get.ts index 24f2ecf..16f0c56 100644 --- a/src/services/users/oauth2/github/callback-add-strategy/get.ts +++ b/src/services/users/oauth2/github/callback-add-strategy/get.ts @@ -17,7 +17,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'GitHub OAuth2 - callback-add-strategy', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/services/users/oauth2/github/callback/get.ts b/src/services/users/oauth2/github/callback/get.ts index 266fcd6..00487c3 100644 --- a/src/services/users/oauth2/github/callback/get.ts +++ b/src/services/users/oauth2/github/callback/get.ts @@ -15,7 +15,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'GitHub OAuth2 - callback', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/services/users/oauth2/github/signin/get.ts b/src/services/users/oauth2/github/signin/get.ts index b6cfdc2..b6b30cc 100644 --- a/src/services/users/oauth2/github/signin/get.ts +++ b/src/services/users/oauth2/github/signin/get.ts @@ -13,7 +13,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'GitHub OAuth2 - signin', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/services/users/oauth2/google/add-strategy/get.ts b/src/services/users/oauth2/google/add-strategy/get.ts index df1e050..5b28a17 100644 --- a/src/services/users/oauth2/google/add-strategy/get.ts +++ b/src/services/users/oauth2/google/add-strategy/get.ts @@ -14,7 +14,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'Google OAuth2 - add-strategy', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], security: [ { bearerAuth: [] diff --git a/src/services/users/oauth2/google/callback-add-strategy/get.ts b/src/services/users/oauth2/google/callback-add-strategy/get.ts index f4c6593..09f1bb9 100644 --- a/src/services/users/oauth2/google/callback-add-strategy/get.ts +++ b/src/services/users/oauth2/google/callback-add-strategy/get.ts @@ -17,7 +17,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'Google OAuth2 - callback-add-strategy', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/services/users/oauth2/google/callback/get.ts b/src/services/users/oauth2/google/callback/get.ts index 4fedf7d..1fedae2 100644 --- a/src/services/users/oauth2/google/callback/get.ts +++ b/src/services/users/oauth2/google/callback/get.ts @@ -15,7 +15,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'Google OAuth2 - callback', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/services/users/oauth2/google/signin/get.ts b/src/services/users/oauth2/google/signin/get.ts index 3648138..62a5315 100644 --- a/src/services/users/oauth2/google/signin/get.ts +++ b/src/services/users/oauth2/google/signin/get.ts @@ -13,7 +13,7 @@ type QuerySchemaType = Static const getServiceSchema: FastifySchema = { description: 'Google OAuth2 - signin', - tags: ['users'] as string[], + tags: ['oauth2'] as string[], querystring: querySchema, response: { 200: Type.String(), diff --git a/src/tools/configurations/swaggerOptions.ts b/src/tools/configurations/swaggerOptions.ts index 3960338..4d035be 100644 --- a/src/tools/configurations/swaggerOptions.ts +++ b/src/tools/configurations/swaggerOptions.ts @@ -16,6 +16,7 @@ export const swaggerOptions: FastifyDynamicSwaggerOptions = { }, tags: [ { name: 'users' }, + { name: 'oauth2' }, { name: 'guilds' }, { name: 'channels' }, { name: 'messages' },