From 24cabc20c0b5fce89124aecfd0ae207d4e1c5f64 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Mon, 25 Nov 2024 16:05:43 -0800 Subject: [PATCH] Fixes #1664: allow ":" and "/" in Document property names --- .../sgv2/jsonapi/config/constants/DocumentConstants.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/stargate/sgv2/jsonapi/config/constants/DocumentConstants.java b/src/main/java/io/stargate/sgv2/jsonapi/config/constants/DocumentConstants.java index 374a68574..0af164f2d 100644 --- a/src/main/java/io/stargate/sgv2/jsonapi/config/constants/DocumentConstants.java +++ b/src/main/java/io/stargate/sgv2/jsonapi/config/constants/DocumentConstants.java @@ -33,10 +33,10 @@ interface Fields { // Current definition of valid JSON API names: note that this only validates // characters, not length limits (nor empty nor "too long" allowed but validated // separately) - Pattern VALID_NAME_PATTERN = Pattern.compile("[a-zA-Z0-9_\\-]*"); + Pattern VALID_NAME_PATTERN = Pattern.compile("[a-zA-Z0-9_\\-:/]*"); /** Field name pattern in sort and filter clause. */ - Pattern VALID_PATH_PATTERN = Pattern.compile("[a-zA-Z0-9_.\\-]*"); + Pattern VALID_PATH_PATTERN = Pattern.compile("[a-zA-Z0-9_\\-:/.]*"); } interface KeyTypeId {