跳到导航

API Explorer 中的多重身份验证方案

API Explorer 现在支持 OpenAPI 规范的多重身份验证方案和身份验证方案组合。

首先,在您的 OpenAPI 规范中配置多个安全选项:

openapi.yml
/plant/search/status:
get:
tags:
- plant
summary: Search plants by status
description: Filter plants based on their current status.
operationId: searchPlantsByStatus
security:
- bearerAuth: [] # Option 1: Bearer token only (OR)
- basicAuth: [] # Option 2: Basic auth AND API key (combined)
apiKey: []

然后,API Explorer 会自动在下拉菜单中显示所有可用的身份验证选项,允许用户在发送请求前选择和配置他们首选的身份验证方法。

API Explorer 中的身份验证下拉菜单
API Explorer 中的身份验证下拉菜单
阅读文档