如何在 RAML 中将 REST 服务标记为已弃用

Sta*_*nov 2 raml

我们正在更新我们的 RAML 0.8 规范,我们希望将一个方法标记为已弃用并指向同一 API 中的另一个方法。这在 RAML 中可能吗?我读了一些文章,但不清楚它是否已经实施

Kaj*_*ler 5

RAML 0.8 缺少这个概念。RAML 1.0 将注释添加到全局部分以传达此类元数据。

PS:示例弃用注释

deprecated:
  properties:
    replaceWith:
      type: string
      description: |
        Describe the alternative resource/method that can be used as a substitute.
      required: true
    since:
      type: string
      pattern: (0[1-9]|10|11|12)/20[0-9]{2}
      required: true
      description: Describe when the resource/method became deprecated in the format (mm/YYYY)
  allowedTargets: [Resource, Method]
  displayName: Deprecated
  description: |
    A deprecated resource or method is *not* recommended for new work.
    The resource or method will be removed in a future version of the API.

    Deprecation does NOT mean it is not supported anymore in the current version.
Run Code Online (Sandbox Code Playgroud)