diff --git a/src/main/java/com/gotocompany/firehose/config/HttpSinkConfig.java b/src/main/java/com/gotocompany/firehose/config/HttpSinkConfig.java index e59a05196..2830fac79 100644 --- a/src/main/java/com/gotocompany/firehose/config/HttpSinkConfig.java +++ b/src/main/java/com/gotocompany/firehose/config/HttpSinkConfig.java @@ -1,15 +1,11 @@ package com.gotocompany.firehose.config; -import com.gotocompany.firehose.config.converter.HttpSinkSerializerJsonTypecastConfigConverter; +import com.gotocompany.firehose.config.converter.*; import com.gotocompany.firehose.config.enums.HttpSinkDataFormatType; import com.gotocompany.firehose.config.enums.HttpSinkParameterPlacementType; import com.gotocompany.firehose.config.enums.HttpSinkParameterSourceType; import com.gotocompany.firehose.config.enums.HttpSinkRequestMethodType; -import com.gotocompany.firehose.config.converter.HttpSinkRequestMethodConverter; -import com.gotocompany.firehose.config.converter.HttpSinkParameterDataFormatConverter; -import com.gotocompany.firehose.config.converter.HttpSinkParameterPlacementTypeConverter; -import com.gotocompany.firehose.config.converter.HttpSinkParameterSourceTypeConverter; -import com.gotocompany.firehose.config.converter.RangeToHashMapConverter; +import com.jayway.jsonpath.Option; import java.util.Map; import java.util.function.Function; @@ -80,6 +76,11 @@ public interface HttpSinkConfig extends AppConfig { @DefaultValue("") String getSinkHttpJsonBodyTemplate(); + @Key("SINK_HTTP_JSON_BODY_TEMPLATE_PARSE_OPTION") + @DefaultValue("") + @ConverterClass(HttpJsonBodyTemplateParseOptionConverter.class) + Option getSinkHttpJsonBodyTemplateParseOption(); + @Key("SINK_HTTP_PARAMETER_PLACEMENT") @DefaultValue("header") @ConverterClass(HttpSinkParameterPlacementTypeConverter.class) diff --git a/src/main/java/com/gotocompany/firehose/config/converter/HttpJsonBodyTemplateParseOptionConverter.java b/src/main/java/com/gotocompany/firehose/config/converter/HttpJsonBodyTemplateParseOptionConverter.java new file mode 100644 index 000000000..6092ab08d --- /dev/null +++ b/src/main/java/com/gotocompany/firehose/config/converter/HttpJsonBodyTemplateParseOptionConverter.java @@ -0,0 +1,14 @@ +package com.gotocompany.firehose.config.converter; + +import com.jayway.jsonpath.Option; +import org.aeonbits.owner.Converter; + +import java.lang.reflect.Method; + +public class HttpJsonBodyTemplateParseOptionConverter implements Converter