Skip to content

Commit

Permalink
Added additional sensitive data fields that should be redacted (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Anderson <[email protected]>
  • Loading branch information
t11omas and Thomas Anderson authored Dec 17, 2024
1 parent adc5a45 commit 6a55fc5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Btms.Backend.Cli/Features/GenerateModels/ClassMaps/Bootstrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,23 @@ public static void RegisterIpaffsClassMaps()
map.MapProperty("email").IsSensitive();
map.MapProperty("ukTelephone").IsSensitive();
map.MapProperty("telephone").IsSensitive();
map.MapProperty("countryISOCode").SetName("countryIsoCode");
map.MapProperty("countryISOCode").SetName("countryIsoCode").IsSensitive();
});

GeneratorClassMap.RegisterClassMap("OfficialInspector", map =>
{
map.MapProperty("firstName").IsSensitive();
map.MapProperty("lastName").IsSensitive();
map.MapProperty("email").IsSensitive();
map.MapProperty("phone").IsSensitive();
map.MapProperty("fax").IsSensitive();
});

GeneratorClassMap.RegisterClassMap("NominatedContact", map =>
{
map.MapProperty("name").IsSensitive();
map.MapProperty("email").IsSensitive();
map.MapProperty("telephone").IsSensitive();
});


Expand Down
1 change: 1 addition & 0 deletions Btms.Types.Ipaffs.V1/Address.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public partial class Address //
/// country 2-digits ISO code
/// </summary>
[JsonPropertyName("countryISOCode")]
[Btms.SensitiveData.SensitiveData]
public string? CountryIsoCode { get; set; }


Expand Down
3 changes: 3 additions & 0 deletions Btms.Types.Ipaffs.V1/NominatedContact.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@ public partial class NominatedContact //
/// Name of nominated contact
/// </summary>
[JsonPropertyName("name")]
[Btms.SensitiveData.SensitiveData]
public string? Name { get; set; }


/// <summary>
/// Email address of nominated contact
/// </summary>
[JsonPropertyName("email")]
[Btms.SensitiveData.SensitiveData]
public string? Email { get; set; }


/// <summary>
/// Telephone number of nominated contact
/// </summary>
[JsonPropertyName("telephone")]
[Btms.SensitiveData.SensitiveData]
public string? Telephone { get; set; }

}
Expand Down
5 changes: 5 additions & 0 deletions Btms.Types.Ipaffs.V1/OfficialInspector.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,39 @@ public partial class OfficialInspector //
/// First name of inspector
/// </summary>
[JsonPropertyName("firstName")]
[Btms.SensitiveData.SensitiveData]
public string? FirstName { get; set; }


/// <summary>
/// Last name of inspector
/// </summary>
[JsonPropertyName("lastName")]
[Btms.SensitiveData.SensitiveData]
public string? LastName { get; set; }


/// <summary>
/// Email of inspector
/// </summary>
[JsonPropertyName("email")]
[Btms.SensitiveData.SensitiveData]
public string? Email { get; set; }


/// <summary>
/// Phone number of inspector
/// </summary>
[JsonPropertyName("phone")]
[Btms.SensitiveData.SensitiveData]
public string? Phone { get; set; }


/// <summary>
/// Fax number of inspector
/// </summary>
[JsonPropertyName("fax")]
[Btms.SensitiveData.SensitiveData]
public string? Fax { get; set; }


Expand Down

0 comments on commit 6a55fc5

Please sign in to comment.