使用typescript rest时,我集成了swagger,它是typescript的软件包,rest是typescript rest swagger
一旦我注释了授权中间件,它就开始工作了。除了象征性的招摇工作很好。
我的 swagger 配置文件看起来像
swagger:
outputDirectory: ./dist
entryFile:
- ./src/controller/*
outputFormat: OpenApi_3
name: Automation API
produces: [application/json]
version: 0.0.1
securityDefinitions:
BearerAuth:
type: apiKey,
name: Authorization,
scheme: bearer,
in: header
它与标签“typescript-rest-swagger”有关
swagger:
outputDirectory: ./dist
entryFile:
- ./src/controller/*
outputFormat: OpenApi_3
name: Automation API
produces: [application/json]
version: 0.0.1
securityDefinitions:
default:
type: apiKey,
name: Authorization,
in: header
适用于我与 typescript-rest-swagger