为什么Swagger Editor不发送Cookie标头?

时间:2018-05-01 09:51:24

标签: swagger-editor

我的OpenAPI定义包括Cookie身份验证。在Swagger编辑器中,curl命令工作正常,但“试一试”不会在请求中添加Cookie标头。知道为什么吗?

openapi: 3.0.0
servers:
  - url: 'XXXXXXX'
info:
  description: xxxxx
  version: 1.0.0
  title: xxxxx
  contact:
    email: xxxxxx

paths:
  '/tenants/{tenant_id}/call/projects':
    get:
      tags:
        - project
      operationId: getProjects
      parameters:
        - name: tenant_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/project'
      security:
        - apiKey: []

components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: auth-token
      in: cookie

0 个答案:

没有答案