Ver código fonte

add security schema to API reference

Ryu Sato 6 anos atrás
pai
commit
6feb152d92
1 arquivos alterados com 14 adições e 0 exclusões
  1. 14 0
      config/swagger-definition.js

+ 14 - 0
config/swagger-definition.js

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