Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KeyVault] - Return void from delete methods #15642

Merged
merged 2 commits into from
Jun 9, 2021

Conversation

maorleger
Copy link
Member

@maorleger maorleger commented Jun 9, 2021

What

-KeyVaultAccessControlClient#deleteRoleAssignment changes to return Promise<void> instead of Promise<RestResponse>
-KeyVaultAccessControlClient#deleteRoleDefinition changes to return Promise<void> instead of Promise<RestResponse>

Why

Originally we wanted to return the raw response so that customers can access the headers / status code / etc. However, with the
upcoming effort to core-v2 returning a raw response today would require us to make a breaking change tomorrow as corev2
does not return the raw response, using a callback instead.

By returning Promise<void> today we will be ready to change to corev2 tomorrow without introducing a breaking change to
these methods.

@ghost ghost added the KeyVault label Jun 9, 2021
Copy link
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@maorleger maorleger merged commit 4a6b88c into Azure:master Jun 9, 2021
@maorleger maorleger deleted the kv-admin-restresponse-to-void branch June 9, 2021 17:56
sadasant pushed a commit to sadasant/azure-sdk-for-js that referenced this pull request Jun 21, 2021
## What

-KeyVaultAccessControlClient#deleteRoleAssignment changes to return `Promise<void>` instead of `Promise<RestResponse>`
-KeyVaultAccessControlClient#deleteRoleDefinition changes to return `Promise<void>` instead of `Promise<RestResponse>`

## Why

Originally we wanted to return the raw response so that customers can access the headers / status code / etc. However, with the 
upcoming effort to core-v2 returning a raw response today would require us to make a breaking change tomorrow as corev2 
does not return the raw response, using a callback instead.

By returning `Promise<void>` today we will be ready to change to corev2 tomorrow without introducing a breaking change to 
these methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants