Skip to content

Commit

Permalink
Remove redundant "rotate" from Keys API (#25714)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
heaths authored and jnlycklama committed Nov 8, 2023
1 parent 5fde138 commit 0878a21
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
4 changes: 0 additions & 4 deletions specification/keyvault/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
9 changes: 0 additions & 9 deletions specification/keyvault/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0878a21

Please sign in to comment.