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] azkeys renames #20892

Merged
merged 10 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/security/keyvault/azkeys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Release History

## 1.0.0 (unreleased)
## 0.12.0 (unreleased)
gracewilcox marked this conversation as resolved.
Show resolved Hide resolved

### Breaking Changes
gracewilcox marked this conversation as resolved.
Show resolved Hide resolved

*Breaking Changes from last preview. Going forward, the module is now stable and will not have breaking api changes.*

* Renamed `GetRandomBytesRequest` to `GetRandomBytesParameters`
* `ListDeletedKey` to `ListDeletedKeyProperties`
* `ListKeys` to `ListKeyProperties`
Expand All @@ -27,6 +25,8 @@
* `JSONWebKeySignatureAlgorithm` to `SignatureAlgorithm`
* `JSONWebKeyType` to `KeyType`
* Removed `DeletionRecoveryLevel` type
* Deleted `SignatureAlgorithmRSNULL` constant
* Removed `MaxResults` option

### Other Changes
* Updated dependencies
Expand Down
14 changes: 11 additions & 3 deletions sdk/security/keyvault/azkeys/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ directive:
where: $.definitions.RestoreKeyParameters.properties.value
transform: $["x-ms-client-name"] = "KeyBackup"

# Remove MaxResults parameter
- where: "$.paths..*"
remove-parameter:
in: query
name: maxresults

# KeyOps updates
- rename-model:
from: KeyOperationsParameters
Expand All @@ -106,9 +112,6 @@ directive:
- from: swagger-document
where: $.definitions..properties..kid
transform: $["x-ms-client-name"] = "KID"
- from: swagger-document
where: $.paths..parameters..[?(@.name=='maxresults')]
transform: $["x-ms-client-name"] = "MaxResults"

# keyName, keyVersion -> name, version
- from: swagger-document
Expand Down Expand Up @@ -172,6 +175,11 @@ directive:
where: $
transform: return $.replace(/const \(\n\s\/\/ DeletionRecoveryLevel(?:.+\s)+\)/, "");

# delete SignatureAlgorithmRSNULL
- from: constants.go
where: $
transform: return $.replace(/.*(\bSignatureAlgorithmRSNULL\b).*/g, "");

# delete unused error models
- from: models.go
where: $
Expand Down
10 changes: 0 additions & 10 deletions sdk/security/keyvault/azkeys/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions sdk/security/keyvault/azkeys/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func TestListDeletedKeys(t *testing.T) {
return err
})
}
pager := client.NewListDeletedKeyPropertiesPager(&azkeys.ListDeletedKeyPropertiesOptions{MaxResults: to.Ptr(int32(1))})
pager := client.NewListDeletedKeyPropertiesPager(nil)
for pager.More() {
resp, err := pager.NextPage(context.Background())
require.NoError(t, err)
Expand Down Expand Up @@ -453,7 +453,7 @@ func TestListKeys(t *testing.T) {
count++
}

pager := client.NewListKeyPropertiesPager(&azkeys.ListKeyPropertiesOptions{MaxResults: to.Ptr(int32(1))})
pager := client.NewListKeyPropertiesPager(nil)
for pager.More() {
resp, err := pager.NextPage(context.Background())
require.NoError(t, err)
Expand Down Expand Up @@ -493,7 +493,7 @@ func TestListKeyVersions(t *testing.T) {
}
defer cleanUpKey(t, client, createResp.Key.KID)

pager := client.NewListKeyPropertiesVersionsPager(keyName, &azkeys.ListKeyPropertiesVersionsOptions{MaxResults: to.Ptr(int32(1))})
pager := client.NewListKeyPropertiesVersionsPager(keyName, nil)
for pager.More() {
resp, err := pager.NextPage(context.Background())
require.NoError(t, err)
Expand Down
3 changes: 0 additions & 3 deletions sdk/security/keyvault/azkeys/constants.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions sdk/security/keyvault/azkeys/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/security/keyvault/azkeys/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ package azkeys

const (
moduleName = "azkeys"
version = "v1.0.0"
version = "v0.12.0"
)