Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api-version should not cause a ChangedParameterOrder error #287

Open
cataggar opened this issue Nov 17, 2023 · 1 comment
Open

api-version should not cause a ChangedParameterOrder error #287

cataggar opened this issue Nov 17, 2023 · 1 comment

Comments

@cataggar
Copy link
Member

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.

        "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:

        "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.

@cataggar cataggar changed the title api-version should not api-version should not cause a ChangedParameterOrder error Nov 17, 2023
@mikekistler
Copy link
Member

Also reported here: Azure/azure-sdk-tools#7170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants