From a56196f3b262da78384b35e40926cac7f81b26c5 Mon Sep 17 00:00:00 2001 From: konstantin Date: Sun, 18 Aug 2024 17:57:57 +0200 Subject: [PATCH 1/2] BO MaBisZaehlpunkt: Make `Id` nullable --- BO4E/BO/MabisZaehlpunkt.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BO4E/BO/MabisZaehlpunkt.cs b/BO4E/BO/MabisZaehlpunkt.cs index b07efa41..d27369a2 100644 --- a/BO4E/BO/MabisZaehlpunkt.cs +++ b/BO4E/BO/MabisZaehlpunkt.cs @@ -22,13 +22,13 @@ public class MabisZaehlpunkt : BusinessObject /// z.B. DE 47108151234567 /// [DefaultValue("|null|")] - [JsonProperty(PropertyName = "Id", Required = Required.Always, Order = 10)] + [JsonProperty(PropertyName = "Id", Required = Required.Default, Order = 10)] [JsonPropertyName("Id")] [JsonPropertyOrder(10)] [DataCategory(DataCategory.POD)] [BoKey] [ProtoMember(4)] - public string Id { get; set; } + public string? Id { get; set; } /// @@ -36,7 +36,7 @@ public class MabisZaehlpunkt : BusinessObject /// /// id to test /// - public static bool ValidateId(string id) + public static bool ValidateId(string? id) { return !string.IsNullOrWhiteSpace(id) && RegexValidate.IsMatch(id); } From 7472dc1258b7b21a1ab4226d7f304826bf60f188 Mon Sep 17 00:00:00 2001 From: konstantin Date: Sun, 18 Aug 2024 19:36:13 +0200 Subject: [PATCH 2/2] strict --- BO4E/BO/MabisZaehlpunkt.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/BO4E/BO/MabisZaehlpunkt.cs b/BO4E/BO/MabisZaehlpunkt.cs index d27369a2..531a9f91 100644 --- a/BO4E/BO/MabisZaehlpunkt.cs +++ b/BO4E/BO/MabisZaehlpunkt.cs @@ -1,3 +1,4 @@ +#nullable enable using BO4E.meta; using Newtonsoft.Json;