Azure / Azure/azure-openapi-validator

TagsAreNotAllowedForProxyResources flagging TrackedResources incorrectly

Open
#741 2 comments 0 reactions 1 assignee Claimed by @tejaswiMinnu View on GitHub
Dominant language
TypeScript
Stars
53
Forks
57
Avg merge
1d 23h
Merged PRs (30d)
2

Description

**Describe the bug**
Swagger LintDiff is incorrectly flagging TrackedResources with the TagsAreNotAllowedForProxyResources rule. These swaggers are auto generated using TypeSpec`TrackedResource` function. The reason this check is looking at these files is because there is no location property for this tracked resource, however this is generated via TypeSpec.

> Link to **tracked** resource in [TSP](https://github.com/Azure/azure-rest-api-specs-pr/blob/f15ff5eea86349c8f2d92c4540d7719e12d223a1/specification/awsconnector/CodeBuildSourceCredentialsInfo.Management/main.tsp#L55):
> ![image](https://github.com/user-attachments/assets/123ab70c-d9cb-47b1-822f-3004f3a8121d)

> Link to error being flagged incorrectly in our [swagger](https://github.com/Azure/azure-rest-api-specs-pr/blob/f15ff5eea86349c8f2d92c4540d7719e12d223a1/specification/awsconnector/resource-manager/Microsoft.AwsConnector/stable/2024-12-01/codeBuildSourceCredentialsInfo.json#L538) for the same resource:
> ![image](https://github.com/user-attachments/assets/a925f905-2ead-42d2-9988-5f9b7e6d9994)
>

**To Reproduce**
Link to PR with this error: https://github.com/Azure/azure-rest-api-specs-pr/pull/19487/checks?check_run_id=29804223056
Related Teams discussion: https://teams.microsoft.com/l/message/19:0351f5f9404446e4b4fd4eaf2c27448d@thread.skype/1725583802723?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=3e17dcb0-4257-4a30-b843-77f47f1d4121&parentMessageId=1725583802723&teamName=Azure%20SDK&channelName=API%20Spec%20Review&createdTime=1725583802723

**Expected behavior**
Check should not flag tracked resources with this rule.

**Screenshots**

![image](https://github.com/user-attachments/assets/28c12df6-a90f-489f-a810-ccf24cb20007)

**Desktop (please complete the following information):**
N/A
Linter Rule

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.