From cf5ba565e46bca0f6bd8b6cfad6b2db1c1f2d9a2 Mon Sep 17 00:00:00 2001 From: Jochen Mader Date: Wed, 11 Dec 2024 12:28:22 +0100 Subject: [PATCH] Fix instructions to be nullable --- .../api/model/mappings/fieldmapping/FieldMappingModel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hivemq-edge/src/main/java/com/hivemq/api/model/mappings/fieldmapping/FieldMappingModel.java b/hivemq-edge/src/main/java/com/hivemq/api/model/mappings/fieldmapping/FieldMappingModel.java index 7d89d8c17..0e5f67e5a 100644 --- a/hivemq-edge/src/main/java/com/hivemq/api/model/mappings/fieldmapping/FieldMappingModel.java +++ b/hivemq-edge/src/main/java/com/hivemq/api/model/mappings/fieldmapping/FieldMappingModel.java @@ -19,6 +19,7 @@ import com.hivemq.persistence.mappings.fieldmapping.FieldMapping; import io.swagger.v3.oas.annotations.media.Schema; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.List; import java.util.Objects; @@ -32,7 +33,7 @@ public class FieldMappingModel { private final @NotNull List instructions; public FieldMappingModel( - @JsonProperty(value = "instructions") final @NotNull List instructions) { + @JsonProperty(value = "instructions") final @Nullable List instructions) { this.instructions = Objects.requireNonNullElse(instructions, List.of()); }