api-version should not cause a ChangedParameterOrder error
- 主要语言
- C#
- 星标
- 290
- 派生
- 50
- 平均合并
- 5 天 13 小时
- 30 天内合并 PR
- 5
描述
I'm working on https://github.com/Azure/azure-rest-api-specs-pr/pull/15631 . I have 57 `ChangedParameterOrder` breaking change errors. Many are due to `ApiVersionParameter` changing order. It should be ignored by the `ChangedParameterOrder` rule.
ChangedParameterOrder
This is the original.
``` json
"operationId": "Locations_CheckQuotaAvailability",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"name": "location",
"in": "path",
"required": true,
"type": "string",
"description": "Azure region"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
],
```
To:
``` json
"operationId": "Locations_CheckQuotaAvailability",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"name": "location",
"in": "path",
"description": "A location in a subscription",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._]+$"
}
],
```
If I move the ApiVersionParameter in the original version to be first, the rule does not consider it breaking.
贡献指南
调研方向
在仓库中搜索 ChangedParameterOrder 规则及其对参数引用的处理方式,然后比较 issue 中所示的原始参数列表和更新后的参数列表。完成的标准是:重新排列 ApiVersionParameter 不再产生此 breaking change 错误,同时仍能检测到其他参数顺序变更;使用 issue 中的示例和相关项目检查进行验证。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp
- 领域
- api, cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100