From 5dd1107d5f2be8d600325d795450e1d854fbe7e8 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Wed, 13 Sep 2023 16:38:17 -0700 Subject: [PATCH] Remove redundant "rotate" from Keys API (#25714) * Remove redundant "rotate" from Keys API Original goal was to properly document "Rotate" that Key Vault returned and "rotate" that Managed HSM returned (and was originally in the swagger), but that case-insensitively duplicative value caused issues with some code generators. Reverts parts of #24475 * Remove now-unnecessary exemptions * Fix description on Notify --- .../Microsoft.KeyVault/preview/7.3-preview/keys.json | 9 ++------- .../Microsoft.KeyVault/preview/7.4-preview.1/keys.json | 9 ++------- .../Microsoft.KeyVault/preview/7.5-preview.1/keys.json | 9 ++------- .../data-plane/Microsoft.KeyVault/stable/7.3/keys.json | 9 ++------- .../data-plane/Microsoft.KeyVault/stable/7.4/keys.json | 9 ++------- specification/keyvault/data-plane/readme.md | 4 ---- .../preview/2021-04-01-preview/keys.json | 9 ++------- .../preview/2021-06-01-preview/keys.json | 9 ++------- .../preview/2021-11-01-preview/keys.json | 9 ++------- .../preview/2022-02-01-preview/keys.json | 9 ++------- .../Microsoft.KeyVault/stable/2022-07-01/keys.json | 9 ++------- .../Microsoft.KeyVault/stable/2022-11-01/keys.json | 9 ++------- .../stable/2022-11-01/keysManagedHsm.json | 9 ++------- .../Microsoft.KeyVault/stable/2023-02-01/keys.json | 9 ++------- .../stable/2023-02-01/keysManagedHsm.json | 9 ++------- specification/keyvault/resource-manager/readme.md | 9 --------- 16 files changed, 28 insertions(+), 111 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 966bf4d6253d..bdbfac77385f 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -2193,10 +2193,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -2205,11 +2204,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.4-preview.1/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.4-preview.1/keys.json index 393002f81be8..cb2b0e0ed73a 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.4-preview.1/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.4-preview.1/keys.json @@ -2221,10 +2221,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -2233,11 +2232,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.5-preview.1/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.5-preview.1/keys.json index 4f95d0c37e6a..fb56751c3d08 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.5-preview.1/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.5-preview.1/keys.json @@ -2199,10 +2199,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -2211,11 +2210,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.3/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.3/keys.json index 9f578346fe52..7588398f8410 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.3/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.3/keys.json @@ -2194,10 +2194,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -2206,11 +2205,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.4/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.4/keys.json index c8cc240a287c..fad90e063061 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.4/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.4/keys.json @@ -2194,10 +2194,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -2206,11 +2205,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/data-plane/readme.md b/specification/keyvault/data-plane/readme.md index e8f09cb362ba..c1c256347aef 100644 --- a/specification/keyvault/data-plane/readme.md +++ b/specification/keyvault/data-plane/readme.md @@ -496,10 +496,6 @@ directive: from: securitydomain.json where: $.definitions.TransferKey.properties.key_format reason: Consistency with other properties - - suppress: EnumUniqueValue - from: keys.json - where: $.definitions.LifetimeActionsType.properties.type - reason: SDK, docs workaround for current service behavior. - suppress: DOUBLE_FORWARD_SLASHES_IN_URL from: rbac.json reason: / is a valid scope in this scenario. diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/keys.json index eedd77532bb7..dc6f4d9d9357 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/keys.json @@ -593,10 +593,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -605,11 +604,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", 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 8ee98a88195e..973d4afb798f 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 @@ -611,10 +611,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -623,11 +622,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/keys.json index 0804a4ae1c2a..07f2b9c498a8 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/keys.json @@ -611,10 +611,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -623,11 +622,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2022-02-01-preview/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2022-02-01-preview/keys.json index 2343ed894da5..ef39402cd48a 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2022-02-01-preview/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2022-02-01-preview/keys.json @@ -612,10 +612,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -624,11 +623,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/keys.json index a9a578d8750e..da7e6f2776e9 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/keys.json @@ -613,10 +613,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -625,11 +624,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-11-01/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-11-01/keys.json index 9b7b1e5cddc9..d35d132ea7e5 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-11-01/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-11-01/keys.json @@ -613,10 +613,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -625,11 +624,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-11-01/keysManagedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-11-01/keysManagedHsm.json index 93fdaa82bae7..53832f83fdac 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-11-01/keysManagedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-11-01/keysManagedHsm.json @@ -542,10 +542,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -554,11 +553,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keys.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keys.json index d14d4976ade4..3758863e7975 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keys.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keys.json @@ -613,10 +613,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -625,11 +624,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keysManagedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keysManagedHsm.json index 3c7b025ae29c..08f7f2969ade 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keysManagedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keysManagedHsm.json @@ -542,10 +542,9 @@ "properties": { "type": { "type": "string", - "description": "The type of the action.", + "description": "The type of the action. The value should be compared case-insensitively.", "enum": [ "Rotate", - "rotate", "Notify" ], "x-ms-enum": { @@ -554,11 +553,7 @@ "values": [ { "value": "Rotate", - "description": "Rotate the key based on the key policy. Key Vault only. Managed HSM uses camelCase 'rotate' instead." - }, - { - "value": "rotate", - "description": "Rotate the key based on the key policy. Managed HSM only. Key Vault uses PascalCase 'Rotate' instead." + "description": "Rotate the key based on the key policy." }, { "value": "Notify", diff --git a/specification/keyvault/resource-manager/readme.md b/specification/keyvault/resource-manager/readme.md index d328f155997d..f92a28449645 100644 --- a/specification/keyvault/resource-manager/readme.md +++ b/specification/keyvault/resource-manager/readme.md @@ -261,15 +261,6 @@ directive: from: keysManagedHsm.json reason: This is to keep compatibility with existing data plane property. The 'release_policy' property for KeyCreateParameters does not support camelCase. -- suppress: EnumUniqueValue - from: keys.json - where: $.definitions.Action.properties.type - reason: SDK, docs workaround for current service behavior. -- suppress: EnumUniqueValue - from: keysManagedHsm.json - where: $.definitions.ManagedHsmAction.properties.type - reason: SDK, docs workaround for current service behavior. - - suppress: INVALID_REQUEST_PARAMETER from: keyvault.json reason: The Vaults_List API endpoint only supports version 2015-11-01.