1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -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:
Daniel García
2023-07-14 17:18:26 +02:00
committed by GitHub
parent 966614c7e2
commit 4f87e4e1a4
41 changed files with 209 additions and 217 deletions

View File

@ -177,8 +177,8 @@ public class ServiceAccountsControllerTests : IClassFixture<ApiApplicationFactor
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ServiceAccountResponseModel>();
Assert.NotNull(result);
Assert.Equal(serviceAccount.Id.ToString(), result!.Id);
Assert.Equal(serviceAccount.OrganizationId.ToString(), result.OrganizationId);
Assert.Equal(serviceAccount.Id, result!.Id);
Assert.Equal(serviceAccount.OrganizationId, result.OrganizationId);
Assert.Equal(serviceAccount.Name, result.Name);
Assert.Equal(serviceAccount.CreationDate, result.CreationDate);
Assert.Equal(serviceAccount.RevisionDate, result.RevisionDate);
@ -229,7 +229,7 @@ public class ServiceAccountsControllerTests : IClassFixture<ApiApplicationFactor
AssertHelper.AssertRecent(result.RevisionDate);
AssertHelper.AssertRecent(result.CreationDate);
var createdServiceAccount = await _serviceAccountRepository.GetByIdAsync(new Guid(result.Id));
var createdServiceAccount = await _serviceAccountRepository.GetByIdAsync(result.Id);
Assert.NotNull(result);
Assert.Equal(request.Name, createdServiceAccount.Name);
AssertHelper.AssertRecent(createdServiceAccount.RevisionDate);