Azure / Azure/openapi-diff

api-version should not cause a ChangedParameterOrder error

オープン
#287 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
290
フォーク
50
平均マージ
5日 13時間
マージ済み PR(30日)
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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Search the repository for the ChangedParameterOrder rule and its handling of parameter references, then compare the original and updated parameter lists shown in the issue. Done means ApiVersionParameter reordering no longer produces this breaking-change error while other parameter-order changes remain detected; validate with the issue's example and the relevant project checks.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
api, cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。