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
**Output Message** : [RPaaS] Only 201 is the supported response code for PUT async response
2931
2933
2932
-
**Description** : An async PUT operation response include status code 201 with Azure-async-operation header. Must also support status code 200, for simple updates that can be completed synchronously (ex: tags). Operation must also add "x-ms-long-running-operation and x-ms-long-running-operation-options" to describe how the long running operation is tracked.
2934
+
**Description** : An async PUT operation response include status code 201 with 'Azure-async-operation' header. Must also support status code 200, for simple updates that can be completed synchronously (ex: tags). 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 201) and how it is tracked (Azure-async-operation header).
2933
2935
2934
2936
**CreatedAt**: August 10, 2020
2935
2937
2936
2938
**LastModifiedAt**: August 10, 2020
2937
2939
2938
-
**Why this rule is important**: RPaaS only supports 201 for async operations. This is enforced at runtime via swagger validation.
2940
+
**Why this rule is important**: RPaaS only supports 201 for async PUT operations. This is enforced at runtime via swagger validation.
2939
2941
2940
2942
**How to fix the violation**: Add the following for async PUT operations.
**Description** : 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).
3004
+
3005
+
**CreatedAt**: November 12, 2020
3006
+
3007
+
**LastModifiedAt**: November 12, 2020
3008
+
3009
+
**Why this rule is important**: RPaaS only supports 202 for async DELETE operations. This is enforced at runtime via swagger validation.
3010
+
3011
+
**How to fix the violation**: Add the following for async DELETE operations.
**Description** : An async POST operation response include status code 202 with 'Location' header. Must support status code 200 if operation can be completed synchronously. 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).
3051
+
3052
+
**CreatedAt**: November 12, 2020
3053
+
3054
+
**LastModifiedAt**: November 12, 2020
3055
+
3056
+
**Why this rule is important**: RPaaS only supports 202 for async POST operations. This is enforced at runtime via swagger validation.
3057
+
3058
+
**How to fix the violation**: Add the following for async POST operations.
3059
+
3060
+
The following would be valid:
3061
+
3062
+
```json
3063
+
...
3064
+
"responses": {
3065
+
"202": {
3066
+
"description": "Operation accepted",
3067
+
},
3068
+
"200": {
3069
+
"description": "Operation completed"
3070
+
},
3071
+
"default": {
3072
+
"description": "Error response describing why the operation failed.",
3073
+
"schema": {
3074
+
"$ref": "#/definitions/ErrorResponse"
3075
+
}
3076
+
}
3077
+
},
3078
+
"x-ms-long-running-operation": true,
3079
+
"x-ms-long-running-operation-options": {
3080
+
"final-state-via": "location"
3081
+
}
3082
+
...
3083
+
```
3084
+
Links: [Index](#index) | [Error vs. Warning](#error-vs-warning) | [Automated Rules](#automated-rules) | [ARM](#arm-violations): [Errors](#arm-errors) or [Warnings](#arm-warnings) | [SDK](#sdk-violations): [Errors](#sdk-errors) or [Warnings](#sdk-warnings)
0 commit comments