You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在AsyncApi中标记Channel为Deprecated?无显示问题求助

如何在AsyncAPI中标记Channel为废弃

你之前把deprecated: true加在了message节点下,这只会标记该消息为废弃,无法让整个Channel显示废弃标识。要标记整个Channel为废弃,需要将deprecated: true放在Channel的根层级,示例如下:

channels:
  queuing.XXX:
    description: >
      ....
    deprecated: true  # 在此处添加废弃标记
    publish:
      message:
        oneOf:
          - name: XXX
            description: >
              ...
            payload:
              $ref: '#/components/schemas/XXX'
...

如果只需要标记该Channel下的某个操作(比如publish/subscribe)为废弃,也可以在对应操作层级添加deprecated: true:

channels:
  queuing.XXX:
    description: >
      ....
    publish:
      deprecated: true  # 仅标记publish操作废弃
      message:
        oneOf:
          - name: XXX
            description: >
              ...
            payload:
              $ref: '#/components/schemas/XXX'
...

内容的提问来源于stack exchange,提问作者philgsk

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 12:05:20