swagger options authorization
const swaggerOptions = {
swaggerDefinition: {
openapi: '3.0.1', // YOU NEED THIS
info: {
title: 'Your API title',
version: '1.0.0',
description: 'Your API description'
},
basePath: '/',
components: {
securitySchemes: {
bearerAuth: {
type: 'http',
scheme: 'bearer',
bearerFormat: 'JWT',
}
}
},
security: [{
bearerAuth: []
}]
},
apis: ['/some/path.js|yml'],
};