To reduce noise, errors should only be reported once per source code location. If another location consumes the code via a $ref, the error should not be duplicated to the consuming location.
An example is this PR, where there are only 3 instances of vmTags.additionalProperties in the source code, but about 9 AvoidAdditionalProperties errors are reported, since the instances are consumed other places via $ref.
https://github.com/Azure/azure-rest-api-specs/pull/29101/checks?check_run_id=25631949240

Local repro:
gh pr checkout 29101
git checkout 3a64798
$ npx autorest --v3 --spectral --azure-validator --semantic-validator=false --model-validator=false --openapi-type=arm --openapi-subtype=arm --use=@microsoft.azure/openapi-validator@2.2.2 --tag=package-preview-2024-04 specification/desktopvirtualization/resource-manager/readme.md
Related: #286
CC: @markcowl
To reduce noise, errors should only be reported once per source code location. If another location consumes the code via a
$ref, the error should not be duplicated to the consuming location.An example is this PR, where there are only 3 instances of
vmTags.additionalPropertiesin the source code, but about 9AvoidAdditionalPropertieserrors are reported, since the instances are consumed other places via$ref.https://github.com/Azure/azure-rest-api-specs/pull/29101/checks?check_run_id=25631949240
Local repro:
Related: #286
CC: @markcowl