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

Revert swagger workarounds after service fix #12853

Merged
Show file tree
Hide file tree
Changes from all commits
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

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

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public virtual Response<RoleAssignment> CreateRoleAssignment(RoleAssignmentScope
try
{
var _name = name == default ? Guid.NewGuid().ToString() : name.ToString();
return _assignmentsRestClient.Create(VaultUri.AbsoluteUri, roleScope.ToString(), _name, properties, cancellationToken);
return _assignmentsRestClient.Create(VaultUri.AbsoluteUri, roleScope.ToString(), _name, new RoleAssignmentCreateParameters(properties), cancellationToken);
}
catch (Exception ex)
{
Expand All @@ -275,7 +275,7 @@ public virtual async Task<Response<RoleAssignment>> CreateRoleAssignmentAsync(Ro
try
{
var _name = name == default ? Guid.NewGuid().ToString() : name.ToString();
return await _assignmentsRestClient.CreateAsync(VaultUri.AbsoluteUri, roleScope.ToString(), _name, properties, cancellationToken)
return await _assignmentsRestClient.CreateAsync(VaultUri.AbsoluteUri, roleScope.ToString(), _name, new RoleAssignmentCreateParameters(properties), cancellationToken)
.ConfigureAwait(false);
}
catch (Exception ex)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace Azure.Security.KeyVault.Administration.Models
{
/// <inheritdoc />
internal partial class RoleAssignmentCreateParameters
{ }
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleAssignmentProperties"
"$ref": "#/definitions/RoleAssignmentCreateParameters"
},
"description": "Parameters for the role assignment."
},
Expand Down Expand Up @@ -349,7 +349,6 @@
"description": "Role assignment list operation result."
},
"RoleAssignmentProperties": {
"type":"object",
"properties": {
"roleDefinitionId": {
"type": "string",
Expand All @@ -366,6 +365,18 @@
],
"description": "Role assignment properties."
},
"RoleAssignmentCreateParameters": {
"properties": {
"properties": {
"$ref": "#/definitions/RoleAssignmentProperties",
"description": "Role assignment properties."
}
},
"required": [
"properties"
],
"description": "Role assignment create parameters."
},
"RoleDefinitionFilter": {
"properties": {
"roleName": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ internal KeyVaultAccessControlClient GetClient(TestRecording recording = null)
[SetUp]
public void ClearChallengeCacheforRecord()
{
Client = GetClient();

// in record mode we reset the challenge cache before each test so that the challenge call
// is always made. This allows tests to be replayed independently and in any order
if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback)
{
Client = GetClient();

ChallengeBasedAuthenticationPolicy.AuthenticationChallenge.ClearCache();
}
}
Expand Down

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

Loading