gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 04:27:51 24 4
gpt4 key购买 nike

我们正在更新 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 - 如何在 RAML 中将 REST 服务标记为已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37943324/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com