【发布时间】:2016-10-22 22:29:20
【问题描述】:
我们正在更新我们的 RAML 0.8 规范,我们希望将一个方法标记为已弃用并指向同一 API 中的另一个方法。在 RAML 中可能吗?我看了一些文章,但不清楚它是否已经实现了
【问题讨论】:
标签: raml
我们正在更新我们的 RAML 0.8 规范,我们希望将一个方法标记为已弃用并指向同一 API 中的另一个方法。在 RAML 中可能吗?我看了一些文章,但不清楚它是否已经实现了
【问题讨论】:
标签: raml
RAML 0.8 缺少这个概念。 RAML 1.0 将注释添加到全局部分以传达此类元数据。
P.S.:一个示例弃用注释
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.
【讨论】: