From 9315842446a0da75a738ebf3eb680f0d9ea018c2 Mon Sep 17 00:00:00 2001 From: Atsushi Nakatsugawa Date: Tue, 5 Nov 2024 22:57:25 +0900 Subject: [PATCH 1/3] Add Security schema --- apps/app/bin/swagger-jsdoc/definition-apiv3.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/app/bin/swagger-jsdoc/definition-apiv3.js b/apps/app/bin/swagger-jsdoc/definition-apiv3.js index 832174be25f..9a546a571cc 100644 --- a/apps/app/bin/swagger-jsdoc/definition-apiv3.js +++ b/apps/app/bin/swagger-jsdoc/definition-apiv3.js @@ -11,11 +11,6 @@ module.exports = { url: 'https://demo.growi.org/_api/v3', }, ], - security: [ - { - api_key: [], - }, - ], components: { securitySchemes: { api_key: { @@ -23,6 +18,11 @@ module.exports = { name: 'access_token', in: 'query', }, + cookieAuth: { + type: 'session', + in: 'cookie', + name: 'connect.sid', + }, }, }, 'x-tagGroups': [ From 816038b1edfae575d9d65b2b5421547d6f3185f0 Mon Sep 17 00:00:00 2001 From: Atsushi Nakatsugawa Date: Fri, 15 Nov 2024 11:20:23 +0900 Subject: [PATCH 2/3] Add default security --- apps/app/bin/swagger-jsdoc/definition-apiv3.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/app/bin/swagger-jsdoc/definition-apiv3.js b/apps/app/bin/swagger-jsdoc/definition-apiv3.js index 9a546a571cc..b7ab46dea1d 100644 --- a/apps/app/bin/swagger-jsdoc/definition-apiv3.js +++ b/apps/app/bin/swagger-jsdoc/definition-apiv3.js @@ -11,6 +11,11 @@ module.exports = { url: 'https://demo.growi.org/_api/v3', }, ], + security: [ + { + api_key: [], + }, + ], components: { securitySchemes: { api_key: { From dec3bbe23fdd63424b1cb06a7535fc19031c7cae Mon Sep 17 00:00:00 2001 From: Atsushi Nakatsugawa Date: Fri, 15 Nov 2024 11:32:57 +0900 Subject: [PATCH 3/3] Change type session to apiKey --- apps/app/bin/swagger-jsdoc/definition-apiv3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/bin/swagger-jsdoc/definition-apiv3.js b/apps/app/bin/swagger-jsdoc/definition-apiv3.js index b7ab46dea1d..d19df00aafe 100644 --- a/apps/app/bin/swagger-jsdoc/definition-apiv3.js +++ b/apps/app/bin/swagger-jsdoc/definition-apiv3.js @@ -24,7 +24,7 @@ module.exports = { in: 'query', }, cookieAuth: { - type: 'session', + type: 'apiKey', in: 'cookie', name: 'connect.sid', },