Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
112 stars 177 forks source link

[GetCollectionOnlyHasValueAndNextLink] Not handle singleton URL - false positive #6592

Open ms-henglu opened 1 year ago

ms-henglu commented 1 year ago

Describe the bug

singleton url like "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfilesSummaries/default" is taken as collection url


    "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfilesSummaries/default": {
      "get": {
        "tags": [
          "BillingProfilesSummaries"
        ],
        "description": "Gets the summary of billing profiles under a billing account. The operation is supported for billing accounts with agreement type Enterprise Agreement.",
        "externalDocs": {
          "url": "https://docs.microsoft.com/en-us/rest/api/billing/"
        },
        "operationId": "BillingProfilesSummaries_Get",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "$ref": "./types.json#/parameters/billingAccountName"
          },
          {
            "$ref": "./types.json#/parameters/apiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/BillingProfilesSummary"
            }
          },
          "default": {
            "description": "Default response",
            "schema": {
              "$ref": "./types.json#/definitions/ArmErrorResponse"
            }
          }
        },
        "x-ms-examples": {
          "BillingProfilesSummaries_Get": {
            "$ref": "./examples/BillingProfilesSummariesGet.json"
          }
        }
      }
    }
  },

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

image

Desktop (please complete the following information):

Additional context https://github.com/Azure/azure-rest-api-specs-pr/pull/12774

konrad-jamrozik commented 1 year ago

Additional context on Teams here.

@rkmanda @bdefoy I assigned you as this rule definition is contested.