提问者:小点点

typescript-rest-swagger securitydefinition bearer token


使用typescript rest时,我集成了swagger,它是typescript的软件包,rest是typescript rest swagger

一旦我注释了授权中间件,它就开始工作了。除了象征性的招摇工作很好。

我的 swagger 配置文件看起来像

  • swagger.config.yml
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”有关


共1个答案

匿名用户

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