mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[PM-2196] Improvements to the Swagger generator (#2914)
* Swagger fixes Co-Authored-By: Oscar Hinton <Hinton@users.noreply.github.com> * Make Response Models return Guids instead of strings * Change strings into guids in ScimApplicationFactory --------- Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
This commit is contained in:
@ -33,10 +33,8 @@ public class GroupsControllerTests
|
||||
organization,
|
||||
Arg.Any<IEnumerable<CollectionAccessSelection>>(),
|
||||
Arg.Any<IEnumerable<Guid>>());
|
||||
|
||||
Assert.NotNull(response.Id);
|
||||
Assert.Equal(groupRequestModel.Name, response.Name);
|
||||
Assert.Equal(organization.Id.ToString(), response.OrganizationId);
|
||||
Assert.Equal(organization.Id, response.OrganizationId);
|
||||
Assert.Equal(groupRequestModel.AccessAll, response.AccessAll);
|
||||
}
|
||||
|
||||
@ -60,10 +58,8 @@ public class GroupsControllerTests
|
||||
Arg.Is<Organization>(o => o.Id == organization.Id),
|
||||
Arg.Any<IEnumerable<CollectionAccessSelection>>(),
|
||||
Arg.Any<IEnumerable<Guid>>());
|
||||
|
||||
Assert.NotNull(response.Id);
|
||||
Assert.Equal(groupRequestModel.Name, response.Name);
|
||||
Assert.Equal(organization.Id.ToString(), response.OrganizationId);
|
||||
Assert.Equal(organization.Id, response.OrganizationId);
|
||||
Assert.Equal(groupRequestModel.AccessAll, response.AccessAll);
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public class OrganizationDomainControllerTests
|
||||
var result = await sutProvider.Sut.Get(orgId.ToString());
|
||||
|
||||
Assert.IsType<ListResponseModel<OrganizationDomainResponseModel>>(result);
|
||||
Assert.Equal(orgId.ToString(), result.Data.Select(x => x.OrganizationId).FirstOrDefault());
|
||||
Assert.Equal(orgId, result.Data.Select(x => x.OrganizationId).FirstOrDefault());
|
||||
}
|
||||
|
||||
[Theory, BitAutoData]
|
||||
@ -125,7 +125,7 @@ public class OrganizationDomainControllerTests
|
||||
var result = await sutProvider.Sut.Get(orgId.ToString(), id.ToString());
|
||||
|
||||
Assert.IsType<OrganizationDomainResponseModel>(result);
|
||||
Assert.Equal(orgId.ToString(), result.OrganizationId);
|
||||
Assert.Equal(orgId, result.OrganizationId);
|
||||
}
|
||||
|
||||
[Theory, BitAutoData]
|
||||
|
Reference in New Issue
Block a user