Skip to content

Commit

Permalink
TopicFilter instructions are now oprional
Browse files Browse the repository at this point in the history
  • Loading branch information
codepitbull committed Dec 11, 2024
1 parent edd7d00 commit 68b3e80
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@
import org.jetbrains.annotations.NotNull;

import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

@Schema(name = "FieldMapping")
public class FieldMappingModel {

@JsonProperty(value = "instructions", required = true)
@JsonProperty(value = "instructions")
@Schema(description = "List of instructions to be applied to incoming data")
private final @NotNull List<InstructionModel> instructions;

public FieldMappingModel(
@JsonProperty(value = "instructions", required = true) final @NotNull List<InstructionModel> instructions) {
this.instructions = instructions;
@JsonProperty(value = "instructions") final @NotNull List<InstructionModel> instructions) {
this.instructions = Objects.requireNonNullElse(instructions, List.of());
}

public @NotNull List<InstructionModel> getInstructions() {
Expand Down

0 comments on commit 68b3e80

Please sign in to comment.