以下示例是关于Whatever中包含Swagger选项授权用法的示例代码,想了解Swagger选项授权的具体用法?Swagger选项授权怎么用?Swagger选项授权使用的例子?那么可以参考以下相关示例代码来学习它的具体使用方法。
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'],
};
本文地址:https://www.itbaoku.cn/snippets/787499.html