diff --git a/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/event/JacksonEventKey.java b/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/event/JacksonEventKey.java index 50d59a6585..f81edc34fc 100644 --- a/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/event/JacksonEventKey.java +++ b/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/event/JacksonEventKey.java @@ -158,6 +158,7 @@ private static boolean isValidKey(final String key) { || c == '.' || c == '-' || c == '_' + || c == '~' || c == '@' || c == '/' || c == '[' diff --git a/data-prepper-api/src/test/java/org/opensearch/dataprepper/model/event/JacksonEventKeyTest.java b/data-prepper-api/src/test/java/org/opensearch/dataprepper/model/event/JacksonEventKeyTest.java index 5eb696a374..436bb515bf 100644 --- a/data-prepper-api/src/test/java/org/opensearch/dataprepper/model/event/JacksonEventKeyTest.java +++ b/data-prepper-api/src/test/java/org/opensearch/dataprepper/model/event/JacksonEventKeyTest.java @@ -68,7 +68,8 @@ void constructor_throws_with_invalid_key(final String key) { "key-with-hyphen", "key_with_underscore", "key@with@at", - "key[with]brackets" + "key[with]brackets", + "key~1withtilda" }) void getKey_returns_expected_result(final String key) { assertThat(new JacksonEventKey(key).getKey(), equalTo(key));