Azure / azure-openapi-validator

Azure Open API Validator
MIT License
47 stars 46 forks source link

TagsAreNotAllowedForProxyResource Incorrectly flagging patch request body as resource #742

Open markcowl opened 2 months ago

markcowl commented 2 months ago

Describe the bug Here is an example: https://github.com/Azure/azure-rest-api-specs-pr/pull/19477/checks?check_run_id=29850162346

In this case, a well-crafted PATCH request body for a tracked resource is flagged as an instance of a proxy resource with a Tags property. Obviously, this is not a resource and this should produce no violation.

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

Expected behavior This rule should not have dtected this as a resource - the schema is only used in PATCH request body and not in PUT or as the response of any crud operation over the resource.

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

Desktop (please complete the following information): n/a This is simply a rules violation

Additional context Add any other context about the problem here.

mikeharder commented 2 months ago

@markcowl: This might be a dup or closely related to #741