Skip to content

Commit

Permalink
swagger completeness fix for asyncOperations status.
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyankar Gupta committed Feb 22, 2022
1 parent 383ded1 commit 3ee7b32
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"location": "East US",
"api-version": "2021-06-01",
"subscriptionId": "subid",
"operationId": "c7ba2bf5-5939-4d79-b037-2964ccf097da"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/providers/Microsoft.Cache/locations/East US/asyncOperations/c7ba2bf5-5939-4d79-b037-2964ccf097da",
"name": "c7ba2bf5-5939-4d79-b037-2964ccf097da",
"status": "Succeeded",
"startTime": null,
"endTime": null,
"percentComplete": null,
"properties": null,
"error": null
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,56 @@
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/asyncOperations/{operationId}": {
"get": {
"tags": [
"AsyncOperationStatus"
],
"operationId": "AsyncOperationStatus_Get",
"description": "For checking the ongoing status of an operation",
"x-ms-examples": {
"RedisCacheAsyncOperationStatus": {
"$ref": "./examples/RedisCacheAsyncOperationStatus.json"
}
},
"parameters": [
{
"name": "location",
"in": "path",
"required": true,
"type": "string",
"description": "The location at which operation was triggered"
},
{
"name": "operationId",
"in": "path",
"required": true,
"type": "string",
"description": "The ID of asynchronous operation"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Asynchronous operation status response",
"schema": {
"$ref": "#/definitions/OperationStatus"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -2693,6 +2743,23 @@
}
},
"description": "The response of listUpgradeNotifications."
},
"OperationStatus": {
"type": "object",
"description": "Asynchronous operation status",
"properties": {
"properties": {
"description": "Additional properties from RP, only when operation is successful",
"type": "object",
"additionalProperties": {}
}
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationStatusResult"
}
],
"x-ms-external": true
}
},
"parameters": {
Expand Down

0 comments on commit 3ee7b32

Please sign in to comment.