You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
merging the relevant checks from DeleteOperationAsyncResponseValidation into delete-response-codes and removing DeleteOperationAsyncResponseValidation (Azure#535)
* merging the relevant checks from DeleteOperationAsyncResponseValidation into delete-response-codes and removing DeleteOperationAsyncResponseValidation. Removing the status code checks from long-running-response-status-code
"comment": "merging linter rules DeleteOperationAsyncResponseValidation and delete-response-codes and removing the checks from long-running-response-status-code as they have conflicting implementations",
Copy file name to clipboardExpand all lines: docs/long-running-response-status-code-data-plane.md
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,14 @@ SDK Error
6
6
7
7
## Applies to
8
8
9
-
ARM and Data plane OpenAPI(swagger) specs
10
-
11
-
## Related ARM Guideline Code
12
-
13
-
- RPC-Async-V1-01
9
+
Data plane OpenAPI(swagger) specs
14
10
15
11
## Output Message
16
12
17
13
A '{0}' operation '{1}' with x-ms-long-running-operation extension must have a valid terminal success status code {2}.
18
14
19
15
## Description
20
16
21
-
For ARM spec, the allowed response status codes for a long DELETE operation are "200" & "204"; the allowed response status codes for a POST operation are "200", "201" ,"202", & "204"; the allowed response status codes for a PUT/PATCH operation are "200" & "201".
22
17
For Data plane spec, the allowed response status codes for a long DELETE operation are "200","202", & "204"; the allowed response status codes for a POST operation are "200", "201" ,"202", & "204"; the allowed response status codes for a PUT/PATCH operation are "200","201", & "202".
Copy file name to clipboardExpand all lines: docs/rules.md
-14Lines changed: 0 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -220,12 +220,6 @@ The request body of a delete operation must be empty.
220
220
221
221
Please refer to [delete-must-not-have-request-body.md](./delete-must-not-have-request-body.md) for details.
222
222
223
-
### DeleteOperationAsyncResponseValidation
224
-
225
-
An async DELETE operation response include status code 202 with 'Location' header. Must support status code 200 if operation can be completed synchronously. Must support 204 (resource doesn't exists). Operation must also add "x-ms-long-running-operation and x-ms-long-running-operation-options" to mark that it is a long running operation (in case of 202) and how it is tracked (Location header).
226
-
227
-
Please refer to [delete-operation-async-response-validation.md](./delete-operation-async-response-validation.md) for details.
228
-
229
223
### DeleteOperationResponses
230
224
231
225
Per ARM Specs, all DELETE methods (non-async) must have responses code implementation: 200, 204.
@@ -450,18 +444,10 @@ Please refer to [long-running-operations-with-long-running-extension.md](./long-
450
444
451
445
### LongRunningResponseStatusCode
452
446
453
-
For ARM spec, the allowed response status codes for a long DELETE operation are "200" & "204"; the allowed response status codes for a POST operation are "200", "201" ,"202", & "204"; the allowed response status codes for a PUT/PATCH operation are "200" & "201".
454
447
For Data plane spec, the allowed response status codes for a long DELETE operation are "200","202", & "204"; the allowed response status codes for a POST operation are "200", "201" ,"202", & "204"; the allowed response status codes for a PUT/PATCH operation are "200","201", & "202".
455
448
456
449
Please refer to [long-running-response-status-code-data-plane.md](./long-running-response-status-code-data-plane.md) for details.
457
450
458
-
### LongRunningResponseStatusCode
459
-
460
-
For ARM spec, the allowed response status codes for a long DELETE operation are "200" & "204"; the allowed response status codes for a POST operation are "200", "201" ,"202", & "204"; the allowed response status codes for a PUT/PATCH operation are "200" & "201".
461
-
For Data plane spec, the allowed response status codes for a long DELETE operation are "200","202", & "204"; the allowed response status codes for a POST operation are "200", "201" ,"202", & "204"; the allowed response status codes for a PUT/PATCH operation are "200","201", & "202".
462
-
463
-
Please refer to [long-running-response-status-code.md](./long-running-response-status-code.md) for details.
464
-
465
451
### LroErrorContent
466
452
467
453
Error response content of long running operations must follow the error schema provided in the common types v2 and above.
constSYNC_ERROR="Synchronous delete operations must have responses with 200, 204, and default return codes. They also must have no other response codes.";
1468
-
constLR_ERROR="Long-running (LRO) delete operations must have responses with 202, 204, and default return codes. They also must have no other response codes.";
1467
+
constSYNC_ERROR="Synchronous delete operations must have responses with 200, 204 and default return codes. They also must have no other response codes.";
1468
+
constLR_ERROR="Long-running delete operations must have responses with 202, 204 and default return codes. They also must have no other response codes.";
1469
+
constEmptyResponse_ERROR="Delete operation response codes must be non-empty. It must have response codes 200, 204 and default if it is sync or 202, 204 and default if it is long running.";
message: `A '${method}' operation '${operationId}' with x-ms-long-running-operation extension must have a valid terminal success status code ${validResponseCodeString}.`,
0 commit comments