From 6a97dc06f93339a72de3b39b4c34257bc56ad0e9 Mon Sep 17 00:00:00 2001 From: Sunny Solanki Date: Tue, 14 Sep 2021 14:55:53 -0700 Subject: [PATCH 1/5] Added exportable attribute and release policy to CP Swagger doc --- .../preview/2021-06-01-preview/keys.json | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json index 2f89167ed638..b0b6e0f666d8 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json @@ -423,6 +423,10 @@ "rotationPolicy": { "$ref": "#/definitions/RotationPolicy", "description": "Key rotation policy in response. It will be used for both output and input. Omitted if empty" + }, + "releasePolicy": { + "$ref": "#/definitions/ReleasePolicy", + "description": "Key release policy in response. It will be used for both output and input. Omitted if empty" } }, "description": "The properties of the key.", @@ -473,6 +477,10 @@ }, "readOnly": true, "x-nullable": false + }, + "exportable": { + "type": "boolean", + "description": "Indicates if the private key can be exported." } }, "description": "The object attributes managed by the Azure Key Vault service.", @@ -614,6 +622,20 @@ } }, "type": "object" + }, + "ReleasePolicy": { + "properties": { + "contentType": { + "description": "Content type and version of key release policy", + "type": "string", + "default": "application/json; charset=utf-8" + }, + "data": { + "description": "Blob encoding the policy rules under which the key can be released.", + "type": "string", + "format": "base64url" + } + } } }, "parameters": { From 00827612721ce5b0bfd4c30e2b6fc19386d3cb2b Mon Sep 17 00:00:00 2001 From: Sunny Solanki Date: Tue, 14 Sep 2021 15:05:07 -0700 Subject: [PATCH 2/5] Specify type as object for ReleasePolicy --- .../Microsoft.KeyVault/preview/2021-06-01-preview/keys.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json index b0b6e0f666d8..2a48f50a8375 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json @@ -634,8 +634,9 @@ "description": "Blob encoding the policy rules under which the key can be released.", "type": "string", "format": "base64url" - } - } + } + }, + "type": "object" } }, "parameters": { From e63de79455e3fe2c070eaaafea7483b107176c48 Mon Sep 17 00:00:00 2001 From: Sunny Solanki Date: Tue, 14 Sep 2021 15:36:04 -0700 Subject: [PATCH 3/5] Address code review comments --- .../Microsoft.KeyVault/preview/2021-06-01-preview/keys.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json index 2a48f50a8375..1963626eaf36 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json @@ -424,8 +424,8 @@ "$ref": "#/definitions/RotationPolicy", "description": "Key rotation policy in response. It will be used for both output and input. Omitted if empty" }, - "releasePolicy": { - "$ref": "#/definitions/ReleasePolicy", + "release_policy": { + "$ref": "#/definitions/KeyReleasePolicy", "description": "Key release policy in response. It will be used for both output and input. Omitted if empty" } }, @@ -623,7 +623,7 @@ }, "type": "object" }, - "ReleasePolicy": { + "KeyReleasePolicy": { "properties": { "contentType": { "description": "Content type and version of key release policy", From 43529930a171fe9c15da0059453e89303d76a468 Mon Sep 17 00:00:00 2001 From: Sunny Solanki Date: Wed, 15 Sep 2021 12:01:43 -0700 Subject: [PATCH 4/5] Add suppression code for camelCase --- specification/keyvault/resource-manager/readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/keyvault/resource-manager/readme.md b/specification/keyvault/resource-manager/readme.md index 9554836c3673..1d75e290a39c 100644 --- a/specification/keyvault/resource-manager/readme.md +++ b/specification/keyvault/resource-manager/readme.md @@ -160,11 +160,12 @@ input-file: ``` yaml directive: - suppress: + - R3016 # The 'release_policy' property for KeyCreateParameters does not support camelCase. - R3026 # The 'PrivateEndpointConnection' and 'PrivateLinkResource' sub-resources don't define PATCH as per Network Team's specification. - R3025 # The 'PrivateLinkResource' is only accessible via List operation; does not define GET as per Network Team's specification. - R4015 # The 'MHSMPrivateEndpointConnection' sub-resource doesn't define List as per Network Team's specification. - - R2005 # The 'ManagedHsms_PurgeDeleted' operation should not return a mix of 202 and syncronous return types (200, 201, 204) as directed by SDK team. - - R4009 # Vault object is the only one that need to be tracked with SystemData + - R2005 # The 'ManagedHsms_PurgeDeleted' operation should not return a mix of 202 and syncronous return types (200, 201, 204) as directed by SDK team. + - R4009 # Vault object is the only one that need to be tracked with SystemData ``` --- From 8379e9028da5a7b2d09a8888ad4f27c45248bfbf Mon Sep 17 00:00:00 2001 From: Sunny Solanki Date: Wed, 15 Sep 2021 12:19:20 -0700 Subject: [PATCH 5/5] Prettier check --- .../preview/2021-06-01-preview/keys.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json index 1963626eaf36..79a675bb9621 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keys.json @@ -626,17 +626,17 @@ "KeyReleasePolicy": { "properties": { "contentType": { - "description": "Content type and version of key release policy", - "type": "string", - "default": "application/json; charset=utf-8" - }, - "data": { - "description": "Blob encoding the policy rules under which the key can be released.", - "type": "string", - "format": "base64url" - } - }, - "type": "object" + "description": "Content type and version of key release policy", + "type": "string", + "default": "application/json; charset=utf-8" + }, + "data": { + "description": "Blob encoding the policy rules under which the key can be released.", + "type": "string", + "format": "base64url" + } + }, + "type": "object" } }, "parameters": {