const swaggerJsdoc = require('swagger-jsdoc')

const options = {
  definition: {
    openapi: '3.0.0',
    info: {
      title: 'Silk Dental Clinic - Identity Provider',
      version: '1.0.0',
      description:
        'This service manages user identities, authentication, and authorization processes within the system. It handles user registration, login, and secure access to various resources by issuing and validating tokens.',
    },
    components: {
      securitySchemes: {
        bearerAuth: {
          type: 'http',
          scheme: 'bearer',
          bearerFormat: 'JWT',
        },
      },
    },
    security: [
      {
        bearerAuth: [],
      },
    ],
  },
  apis: ['./src/routes/*.js', './src/models/*.js'],
}

const specs = swaggerJsdoc(options)

module.exports = specs
