> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-mintlify-add-hello-world-quickstart-48843.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 多个响应

> 为同一端点展示不同的响应版本

如果你的 API 会根据输入参数、用户上下文或请求的其他条件返回不同的响应，你可以使用 `examples` 属性为其记录多个响应示例。

该属性可添加到任何响应中，其模式如下所示。

```yaml
responses:
  "200":
    description: 成功响应
    content:
      application/json:
        schema:
          $ref: "#/components/schemas/YourResponseSchema"
        examples:
          us:
            summary: 面向美国的响应
            value:
              countryCode: "US"
              currencyCode: "USD"
              taxRate: 0.0825
          gb:
            summary: 面向英国的响应
            value:
              countryCode: "GB"
              currencyCode: "GBP"
              taxRate: 0.20
```
