diff --git a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ListToMapProcessorConfig.java b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ListToMapProcessorConfig.java
index 8059e13a5f..d998684444 100644
--- a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ListToMapProcessorConfig.java
+++ b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ListToMapProcessorConfig.java
@@ -13,7 +13,6 @@
import com.fasterxml.jackson.annotation.JsonValue;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
-import org.opensearch.dataprepper.model.annotations.AlsoRequired;
import java.util.Arrays;
import java.util.List;
@@ -24,8 +23,6 @@
@JsonClassDescription("The list_to_map
processor converts a list of objects from an event, " +
"where each object contains a key
field, into a map of target keys.")
public class ListToMapProcessorConfig {
- static final String KEY_KEY = "key";
-
public enum FlattenedElement {
FIRST("first"),
LAST("last");
@@ -67,12 +64,9 @@ public String getOptionValue() {
@JsonProperty("use_source_key")
@JsonPropertyDescription("When true
, keys in the generated map will use original keys from the source. " +
"Default is false
.")
- @AlsoRequired(values = {
- @AlsoRequired.Required(name = KEY_KEY)
- })
private boolean useSourceKey = false;
- @JsonProperty(KEY_KEY)
+ @JsonProperty("key")
@JsonPropertyDescription("The key of the fields to be extracted as keys in the generated mappings. Must be " +
"specified if use_source_key
is false
.")
private String key;