From ad4d5d740271a5b6f27766b976abce72412ffd8e Mon Sep 17 00:00:00 2001 From: Ritesh Chitlangia Date: Tue, 22 Dec 2020 10:38:09 -0800 Subject: [PATCH 1/4] Fixing swagger correctness errors for managed hsm --- .../2020-04-01-preview/examples/ManagedHsm_Get.json | 9 ++++++++- .../preview/2020-04-01-preview/managedHsm.json | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/examples/ManagedHsm_Get.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/examples/ManagedHsm_Get.json index 9dd9972f3fac..40b2b539ee12 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/examples/ManagedHsm_Get.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/examples/ManagedHsm_Get.json @@ -33,6 +33,13 @@ "Environment": "dogfood" } } - } + }, + "202": { + "headers": { + "Retry-After": "60", + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2020-04-01-preview&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + }, + "204": {} } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json index 580f61bab4a9..c6b44765a5bb 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json @@ -394,6 +394,7 @@ }, "hsmUri": { "type": "string", + "readOnly": true, "description": "The URI of the managed hsm pool for performing operations on keys." }, "enableSoftDelete": { @@ -409,6 +410,7 @@ }, "enablePurgeProtection": { "type": "boolean", + "default": true, "description": "Property specifying whether protection against purge is enabled for this managed HSM pool. Setting this property to true activates protection against purge for this managed HSM pool and its content - only the Managed HSM service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible." }, "createMode": { From 770041449c3599202f181802b22b6b17ec27edc1 Mon Sep 17 00:00:00 2001 From: Ritesh Chitlangia Date: Tue, 22 Dec 2020 10:51:37 -0800 Subject: [PATCH 2/4] Fixing swagger correctness errors for managed hsm --- .../preview/2020-04-01-preview/managedHsm.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json index c6b44765a5bb..df6f22510b4d 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json @@ -232,6 +232,15 @@ "description": "Retrieved managed HSM Pool", "schema": { "$ref": "#/definitions/ManagedHsm" + }, + "204": { + "description": "Request successful. Resource does not exist." + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/ManagedHsm" + } } }, "default": { From 3e2fcc3b5577da8dd971a9e4d8296718deae7608 Mon Sep 17 00:00:00 2001 From: Ritesh Chitlangia Date: Tue, 22 Dec 2020 10:59:29 -0800 Subject: [PATCH 3/4] Fixing swagger correctness errors for managed hsm --- .../preview/2020-04-01-preview/managedHsm.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json index df6f22510b4d..d4334631cb1b 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json @@ -232,17 +232,17 @@ "description": "Retrieved managed HSM Pool", "schema": { "$ref": "#/definitions/ManagedHsm" - }, - "204": { - "description": "Request successful. Resource does not exist." - }, - "202": { - "description": "Accepted and the operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/ManagedHsm" - } } }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/ManagedHsm" + } + }, + "204": { + "description": "Request successful. Resource does not exist." + }, "default": { "description": "The error response describing why the operation failed.", "schema": { From cd8ab29d22fb37e69dda252b0427d057bc4a86bd Mon Sep 17 00:00:00 2001 From: Ritesh Chitlangia Date: Tue, 22 Dec 2020 11:03:40 -0800 Subject: [PATCH 4/4] Validation errors --- .../preview/2020-04-01-preview/managedHsm.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json index d4334631cb1b..012e91502b76 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2020-04-01-preview/managedHsm.json @@ -235,10 +235,7 @@ } }, "202": { - "description": "Accepted and the operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/ManagedHsm" - } + "description": "Accepted and the operation will complete asynchronously." }, "204": { "description": "Request successful. Resource does not exist."