From 92e42ce26f695926305fdf8647f7bf20140286c1 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Thu, 14 Oct 2021 00:47:10 -0700 Subject: [PATCH 1/4] Bypass incompatible responses --- .../examples/purgeDeletedVault.json | 9 --------- .../examples/updateAccessPoliciesAdd.json | 9 --------- specification/keyvault/resource-manager/readme.md | 12 ++++++++++++ 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/purgeDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/purgeDeletedVault.json index f39a347c1094..ae7455752e2f 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/purgeDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/purgeDeletedVault.json @@ -11,15 +11,6 @@ }, "202": { "headers": {} - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/updateAccessPoliciesAdd.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/updateAccessPoliciesAdd.json index 58c13c9dd8ec..6f199852e2ee 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/updateAccessPoliciesAdd.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/updateAccessPoliciesAdd.json @@ -77,15 +77,6 @@ ] } } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } } } } diff --git a/specification/keyvault/resource-manager/readme.md b/specification/keyvault/resource-manager/readme.md index d7744c19bc1f..f46df8638bf1 100644 --- a/specification/keyvault/resource-manager/readme.md +++ b/specification/keyvault/resource-manager/readme.md @@ -168,6 +168,18 @@ directive: - R4009 # Vault object is the only one that need to be tracked with SystemData ``` +``` yaml +directive: +- from: keyvault.json + where: $.['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'].put.responses + transform: delete $["404"] + reason: Incompatible responses +- from: keyvault.json + where: $.['/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'].post.responses + transform: delete $["404"] + reason: Incompatible responses +``` + --- # Code Generation From 2aec54f318cb1f3adf70c3a65166068c86b2fb4d Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Thu, 14 Oct 2021 00:55:44 -0700 Subject: [PATCH 2/4] Add missing path --- specification/keyvault/resource-manager/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/keyvault/resource-manager/readme.md b/specification/keyvault/resource-manager/readme.md index f46df8638bf1..0f129775c2c3 100644 --- a/specification/keyvault/resource-manager/readme.md +++ b/specification/keyvault/resource-manager/readme.md @@ -171,11 +171,11 @@ directive: ``` yaml directive: - from: keyvault.json - where: $.['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'].put.responses + where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'].put.responses transform: delete $["404"] reason: Incompatible responses - from: keyvault.json - where: $.['/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'].post.responses + where: $.paths['/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'].post.responses transform: delete $["404"] reason: Incompatible responses ``` From 88cafb3ec1367fd6f1d390babd179d45f1cbec88 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Thu, 14 Oct 2021 01:20:49 -0700 Subject: [PATCH 3/4] Add version info --- specification/keyvault/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/keyvault/resource-manager/readme.md b/specification/keyvault/resource-manager/readme.md index 0f129775c2c3..7b65347a8e95 100644 --- a/specification/keyvault/resource-manager/readme.md +++ b/specification/keyvault/resource-manager/readme.md @@ -168,7 +168,7 @@ directive: - R4009 # Vault object is the only one that need to be tracked with SystemData ``` -``` yaml +``` yaml ($(csharp) && ($(tag) == 'package-preview-2021-06')) directive: - from: keyvault.json where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'].put.responses From 2b425f01079778194dab76c66149aed844a41485 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Mon, 18 Oct 2021 11:35:39 -0700 Subject: [PATCH 4/4] Removing undesired 404 --- .../preview/2021-06-01-preview/keyvault.json | 14 -------------- specification/keyvault/resource-manager/readme.md | 12 ------------ 2 files changed, 26 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keyvault.json index 3dd42bd0bdfd..34244ac93421 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keyvault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/keyvault.json @@ -332,13 +332,6 @@ "$ref": "#/definitions/VaultAccessPolicyParameters" } }, - "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "common.json#/definitions/CloudError" - }, - "x-ms-error-response": true - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -608,13 +601,6 @@ "202": { "description": "Vault is being purged." }, - "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "common.json#/definitions/CloudError" - }, - "x-ms-error-response": true - }, "default": { "description": "Error response describing why the operation failed.", "schema": { diff --git a/specification/keyvault/resource-manager/readme.md b/specification/keyvault/resource-manager/readme.md index 7b65347a8e95..d7744c19bc1f 100644 --- a/specification/keyvault/resource-manager/readme.md +++ b/specification/keyvault/resource-manager/readme.md @@ -168,18 +168,6 @@ directive: - R4009 # Vault object is the only one that need to be tracked with SystemData ``` -``` yaml ($(csharp) && ($(tag) == 'package-preview-2021-06')) -directive: -- from: keyvault.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'].put.responses - transform: delete $["404"] - reason: Incompatible responses -- from: keyvault.json - where: $.paths['/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'].post.responses - transform: delete $["404"] - reason: Incompatible responses -``` - --- # Code Generation