For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
预约演示登录免费开始
  • 概览
    • 什么是 API 定义?
    • 项目结构
      • 概览
      • 覆盖层(Overlays)
      • 覆盖(Overrides)
      • 身份验证
      • 服务器
      • 同步您的规范
        • 概览
        • API 版本
        • 受众
        • 可用性
        • 基础路径
        • 默认值
        • 枚举描述、名称和可用性
        • API Explorer 控制
        • 全局请求头
        • 忽略元素
        • SDK 变量
        • SDK 方法名称
        • 参数名称
        • 属性名称
        • 幂等性
        • 分页
        • 重试行为
        • Schema 名称
        • 服务器名称和 URL 模板化
        • 模式名称
        • 服务器名称和 URL 模板化
      • OpenAPI generators.yml 参考
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
预约演示登录免费开始
在本页
  • 全局
  • 端点
  • 结合全局和端点级别设置
OpenAPI扩展

API Explorer 控制

||以 Markdown 格式查看|
此页面是否有帮助?
在仪表板中编辑
上一个

请求 + 响应示例

下一个

全局请求头

API Explorer 默认为所有端点启用。使用 x-fern-explorer 全局禁用或按操作覆盖。这通常用于对破坏性操作、支付处理或仅限管理员的端点禁用 Explorer。

全局

要为整个 API 禁用 API Explorer,请在根级别添加 x-fern-explorer:

openapi.yml
1openapi: 3.0.2
2x-fern-explorer: false # 为所有端点禁用 Explorer
3info:
4 title: My API
5 version: 1.0.0
6paths:
7 /payments:
8 get:
9 operationId: list_payments

端点

要控制各个端点的 API Explorer,请使用 x-fern-explorer:

openapi.yml
1paths:
2 /payments:
3 get:
4 x-fern-explorer: true # 为安全的读取操作启用 Explorer
5 /payments/charge:
6 post:
7 x-fern-explorer: false # 禁用以防止意外交易

结合全局和端点级别设置

您可以结合使用两种扩展来全局设置默认行为并为特定端点覆盖:

openapi.yml
1openapi: 3.0.2
2x-fern-explorer: false # 全局禁用 Explorer
3info:
4 title: My API
5 version: 1.0.0
6paths:
7 /payments:
8 get:
9 operationId: list_payments
10 x-fern-explorer: true # 为安全的读取操作启用 Explorer
11 /payments/charge:
12 post:
13 operationId: charge_payment
14 # 保持禁用(应用全局设置)