Open vatsalyachauhan opened 1 year ago
@bdefoy @rkmanda FYI
Task 23293646: [LintDiff][False positive] [~[Staging] Swagger LintDiff failed] Incorrect validation rule "DeleteResponseCodes"
Any operation must either be defined as sync or async as per the data plane guidelines. ARM adopts the same rule but allows for a 204 to be returned when the resource is already deleted. So the valid status codes are 200 and 204 for sync delete and 202 and 204 for async delete. What are the conditions under which a 200 maybe returned for an async delete in your scenario?
Data plane guidance that we are aligning to is documented here - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#lro-returns-only-202
Describe the bug The rule DeleteResponseCodes might be incorrect. I believe, an async api implementation may choose to complete the operation Synchronously based on some conditions and return 200 instead of 202.
Reference: DeleteOperationAsyncResponseValidation
Example where the validation failed: https://github.com/Azure/azure-rest-api-specs/pull/24037/checks?check_run_id=13566776598