2024-10-28 23:27:40 +05:30
|
|
|
import swaggerJSDoc from 'swagger-jsdoc';
|
|
|
|
|
import path from 'path';
|
|
|
|
|
|
|
|
|
|
const options = {
|
|
|
|
|
definition: {
|
|
|
|
|
openapi: '3.0.0',
|
|
|
|
|
info: {
|
|
|
|
|
title: 'Maxun API Documentation',
|
|
|
|
|
version: '1.0.0',
|
|
|
|
|
description: 'API documentation for robot management',
|
|
|
|
|
},
|
2024-10-28 23:45:15 +05:30
|
|
|
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
|
|
|
|
|
},
|
|
|
|
|
],
|
2024-10-28 23:27:40 +05:30
|
|
|
},
|
|
|
|
|
apis: [path.join(__dirname, '../api/*.ts')],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const swaggerSpec = swaggerJSDoc(options);
|
|
|
|
|
|
|
|
|
|
export default swaggerSpec;
|