Azure / azure-openapi-validator

Azure Open API Validator
MIT License
44 stars 43 forks source link

False positive for parent segments in path? #720

Open TimLovellSmith opened 6 days ago

TimLovellSmith commented 6 days ago

Describe the bug

We get LintDiff warnings like this.

⚠️ MissingSegmentsInNestedResourceListOperation | A nested resource type's List operation must include all the parent segments in its api path.Location: Microsoft.Network/preview/2024-01-01-preview/ipAddressManager.json#L8 | RPC-Get-V1-11

But its unclear why.

The path its complaining about seems to be "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents": {

it looks like the parent path declaration is compatible: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}": {

source file: https://github.com/Azure/azure-rest-api-specs-pr/blob/bdafd95bd0cd77f68be044bd5e8436518c9f5920/specification/network/resource-manager/Microsoft.Network/preview/2024-01-01-preview/networkVerifier.json#

Is the analyzer confused by the extra query parameters?

To Reproduce Steps to reproduce the behavior: See https://github.com/Azure/azure-rest-api-specs-pr/pull/17956/checks?check_run_id=26909351197

Expected behavior If its a real false positive, no warning, right.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context