feat: x-api-key security

This commit is contained in:
karishmas6
2024-10-28 23:45:15 +05:30
parent bf2b0b24d9
commit 75bfdfcee1

View File

@@ -9,6 +9,21 @@ const options = {
version: '1.0.0',
description: 'API documentation for robot management',
},
components: {
securitySchemes: {
ApiKeyAuth: {
type: 'apiKey',
in: 'header',
name: 'x-api-key',
description: 'API key for authorization. You can find your API key in the "API Key" section on Maxun Dashboard.',
},
},
},
security: [
{
ApiKeyAuth: [], // Apply this security scheme globally
},
],
},
apis: [path.join(__dirname, '../api/*.ts')],
};