api-version should not cause a ChangedParameterOrder error
- Dominant language
- C#
- Stars
- 290
- Forks
- 50
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 5
Description
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.
Contributor guide
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100