From 000ad1c3edf4e0d32fee166e5c8dbba26ccefe4b Mon Sep 17 00:00:00 2001 From: Harkirat Singh Date: Fri, 21 Aug 2020 14:38:56 +0530 Subject: [PATCH] Swagger fixes: a. Enhance the operation discovery with a relevant example. b. Fix the move resource properties error filed to be readonly. --- .../examples/OperationsDiscovery_Get.json | 22 ++++++++++++++----- .../regionmovecollection.json | 10 +++++++-- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/OperationsDiscovery_Get.json b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/OperationsDiscovery_Get.json index f6c7b66be98b..b71e8c07909c 100644 --- a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/OperationsDiscovery_Get.json +++ b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/OperationsDiscovery_Get.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2016-08-10", + "api-version": "2019-10-01-preview", "resourceGroupName": "resourceGroupPS1", "subscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" }, @@ -9,12 +9,22 @@ "body": { "value": [ { - "name": "Microsoft.RecoveryServices/Vaults/vaultTokens/read", + "name": "Read", "display": { - "provider": "Microsoft.RecoveryServices", - "resource": "Vaults", - "operation": "Vault Token", - "description": "The Vault Token operation can be used to get Vault Token for vault level backend operations." + "provider": "Microsoft.Migrate", + "resource": "Microsoft.Migrate/moveCollections", + "operation": "Read", + "description": "Reads the move collection." + }, + "origin": "user" + }, + { + "name": "Write", + "display": { + "provider": "Microsoft.Migrate", + "resource": "Microsoft.Migrate/moveCollections", + "operation": "Write", + "description": "Creates or updates a move collection." }, "origin": "user" } diff --git a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json index 8bcda3e3fa75..c33eda824227 100644 --- a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json +++ b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json @@ -19,7 +19,7 @@ "MoveCollections" ], "operationId": "MoveCollections_Create", - "description": "Creates a move collection.", + "description": "Creates or updates a move collection.", "consumes": [ "application/json" ], @@ -1171,7 +1171,13 @@ } }, "errors": { - "$ref": "#/definitions/MoveResourceError" + "description": "Defines the move resource errors.", + "allOf": [ + { + "$ref": "#/definitions/MoveResourceError" + } + ], + "readOnly": true } } },