import swaggerJSDoc from 'swagger-jsdoc'; import path from 'path'; export const swaggerOptions = { definition: { openapi: '3.0.0', info: { title: 'SerpentRace API', version: '1.0.0', description: 'Comprehensive API documentation for SerpentRace Backend', contact: { name: 'SerpentRace Development Team', email: 'dev@serpentrace.com' }, license: { name: 'MIT', url: 'https://opensource.org/licenses/MIT' } }, servers: [ { url: 'http://localhost:3001', description: 'Local development server' }, { url: 'http://localhost:3000', description: 'Local development server (alt)' }, { url: 'https://api.serpentrace.com', description: 'Production server' } ], components: { securitySchemes: { bearerAuth: { type: 'http', scheme: 'bearer', bearerFormat: 'JWT', description: 'Enter JWT token obtained from /api/users/login' } } }, security: [{ bearerAuth: [] }], tags: [ { name: 'Users', description: 'User authentication and profile management' }, { name: 'Organizations', description: 'Organization management and authentication' }, { name: 'Decks', description: 'Deck creation, management, and gameplay' }, { name: 'Chats', description: 'Real-time chat and messaging system' }, { name: 'Contacts', description: 'Contact form and support requests' }, { name: 'Deck Import/Export', description: 'Import and export deck functionality' }, { name: 'Games', description: 'Game management and gameplay' }, { name: 'Admin - Users', description: 'Admin user management operations' }, { name: 'Admin - Decks', description: 'Admin deck management operations' }, { name: 'Admin - Organizations', description: 'Admin organization management operations' }, { name: 'Admin - Chats', description: 'Admin chat management operations' }, { name: 'Admin - Contacts', description: 'Admin contact management operations' } ] }, apis: [ './src/Api/swagger/swaggerDefinitionsFixed.ts' ], }; export const swaggerSpec = swaggerJSDoc(swaggerOptions);