Skip to content

Commit 344d41a

Browse files
FrostyApeOneFrostyApeOne
authored andcommitted
Updated models missing jsonpropertyname
1 parent c1699fe commit 344d41a

5 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
using System.Text.Json.Serialization;
2+
13
namespace GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Models.Request;
24

35
/// <summary>
46
/// Creates a custom tenant role (non-system).
57
/// </summary>
68
public class CreateTenantRoleRequest
79
{
10+
[JsonPropertyName("name")]
811
public string Name { get; set; } = null!;
912
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
using System.Text.Json.Serialization;
2+
13
namespace GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Models.Request;
24

35
/// <summary>
46
/// Renames a custom tenant role.
57
/// </summary>
68
public class RenameTenantRoleRequest
79
{
10+
[JsonPropertyName("name")]
811
public string Name { get; set; } = null!;
912
}

src/GovUK.Dfe.CoreLibs.Contracts/ExternalApplications/Models/Request/SetRolePermissionsRequest.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Text.Json.Serialization;
12
using GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Enums;
23

34
namespace GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Models.Request;
@@ -7,8 +8,13 @@ namespace GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Models.Request;
78
/// </summary>
89
public class RolePermissionGrantDto
910
{
11+
[JsonPropertyName("resourceType")]
1012
public ResourceType ResourceType { get; set; }
13+
14+
[JsonPropertyName("resourceKey")]
1115
public string ResourceKey { get; set; } = null!;
16+
17+
[JsonPropertyName("accessType")]
1218
public AccessType AccessType { get; set; }
1319
}
1420

@@ -17,6 +23,7 @@ public class RolePermissionGrantDto
1723
/// </summary>
1824
public class SetRolePermissionsRequest
1925
{
26+
[JsonPropertyName("permissions")]
2027
public IReadOnlyCollection<RolePermissionGrantDto> Permissions { get; set; }
2128
= Array.Empty<RolePermissionGrantDto>();
2229
}

src/GovUK.Dfe.CoreLibs.Contracts/ExternalApplications/Models/Response/RolePermissionDto.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Text.Json.Serialization;
12
using GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Enums;
23

34
namespace GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Models.Response;
@@ -7,8 +8,15 @@ namespace GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Models.Response;
78
/// </summary>
89
public class RolePermissionDto
910
{
11+
[JsonPropertyName("rolePermissionId")]
1012
public Guid RolePermissionId { get; set; }
13+
14+
[JsonPropertyName("resourceType")]
1115
public ResourceType ResourceType { get; set; }
16+
17+
[JsonPropertyName("resourceKey")]
1218
public string ResourceKey { get; set; } = null!;
19+
20+
[JsonPropertyName("accessType")]
1321
public AccessType AccessType { get; set; }
1422
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
using System.Text.Json.Serialization;
2+
13
namespace GovUK.Dfe.CoreLibs.Contracts.ExternalApplications.Models.Response;
24

35
/// <summary>
46
/// Tenant-scoped role summary.
57
/// </summary>
68
public class TenantRoleDto
79
{
10+
[JsonPropertyName("roleId")]
811
public Guid RoleId { get; set; }
12+
13+
[JsonPropertyName("name")]
914
public string Name { get; set; } = null!;
15+
16+
[JsonPropertyName("isSystem")]
1017
public bool IsSystem { get; set; }
1118
}

0 commit comments

Comments
 (0)