Skip to content

Commit

Permalink
FIX: missing required fields annotation (#4990)
Browse files Browse the repository at this point in the history
Signed-off-by: George Chen <[email protected]>
  • Loading branch information
chenqi0805 authored Oct 1, 2024
1 parent c3b155f commit 54ede84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public List<Entry> getIterativeConfig() {
}

@JsonPropertyDescription("List of entries. Valid values are `source`, `delimiter`, and `delimiter_regex`.")
@NotNull
private List<@Valid Entry> entries;

public List<Entry> getEntries() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.NotNull;
import org.opensearch.dataprepper.model.event.EventKey;

import java.util.List;
Expand Down Expand Up @@ -59,6 +60,7 @@ public Entry() {}
}

@JsonPropertyDescription("List of entries. Valid values are `source`, `from`, and `to`, and `substitute_when`.")
@NotNull
private List<Entry> entries;

public List<Entry> getEntries() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class MappingsParameterConfig {
@JsonProperty("targets")
@JsonPropertyDescription("A list of target field configurations, such as the target field key or translation maps.")
@Valid
@NotNull
private List<TargetsParameterConfig> targetsParameterConfigs = new ArrayList<>();

public Object getSource() {
Expand Down

0 comments on commit 54ede84

Please sign in to comment.