Azure / Azure/openapi-diff

api-version should not cause a ChangedParameterOrder error

Ouverte
#287 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C#
Étoiles
290
Forks
50
Merge moyen
5 j 13 h
PR mergées (30 j)
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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
csharp
Domaine
api, cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.