Browse Source

add security schema to API reference

Ryu Sato 6 years ago
parent
commit
6feb152d92
1 changed files with 14 additions and 0 deletions
  1. 14 0
      config/swagger-definition.js

+ 14 - 0
config/swagger-definition.js

@@ -13,4 +13,18 @@ module.exports = {
       url: 'https://demo.growi.org',
     },
   ],
+  security: [
+    {
+      api_key: [],
+    },
+  ],
+  components: {
+    securitySchemes: {
+      api_key: {
+        type: 'apiKey',
+        name: 'access_token',
+        in: 'query',
+      },
+    },
+  },
 };