如何在 RAML 中将 REST 服务标记为已弃用
How to mark a REST service as deprecated in RAML
我们正在更新我们的 RAML 0.8 规范,我们想将一个方法标记为已弃用并指向同一 API 中的另一个方法。这在 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.
我们正在更新我们的 RAML 0.8 规范,我们想将一个方法标记为已弃用并指向同一 API 中的另一个方法。这在 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.