我的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