OpenAPI 3 Custom type in Authorization header

前端 未结 2 634
迷失自我
迷失自我 2020-12-12 01:32

I am looking for the proper way to specify an Authorization header with a custom type like ApiKey in openAPI 3.

The custom Authorization header should look like

2条回答
  •  自闭症患者
    2020-12-12 01:51

    Please try this:

      securitySchemes:
        ApiKeyAuth:
           type: apiKey
           in: header
           name: ApiKey
      security
        - ApiKeyAuth: []
    

    Please have a look at the documentation:

    -> Step 2. Applying security

    Authentication and Authorization

提交回复
热议问题