From e6d1314bad7402c54a8fe0e9f1ee93545ed26223 Mon Sep 17 00:00:00 2001 From: Edyta Krukowska Date: Mon, 31 Aug 2020 12:56:55 +0200 Subject: Change parameters of external-schema-manager to JSON notation Issue-ID: DCAEGEN2-2400 Signed-off-by: Edyta Krukowska Change-Id: Ib5629b346b232a82a863406c11284e6aba0c0a94 --- pom.xml | 2 +- rest-services/cbs-client/pom.xml | 2 +- rest-services/dmaap-client/pom.xml | 2 +- rest-services/http-client/pom.xml | 2 +- rest-services/model/pom.xml | 2 +- rest-services/pom.xml | 2 +- security/crypt-password/pom.xml | 2 +- security/pom.xml | 2 +- security/ssl/pom.xml | 2 +- services/external-schema-manager/pom.xml | 2 +- .../external/schema/manager/service/JsonFragmentRetriever.java | 9 ++++++++- .../external/schema/manager/service/StndDefinedValidator.java | 4 ++-- .../schema/manager/service/JsonFragmentRetrieverTest.java | 2 +- services/hv-ves-client/pom.xml | 2 +- services/hv-ves-client/producer/api/pom.xml | 2 +- services/hv-ves-client/producer/ct/pom.xml | 2 +- services/hv-ves-client/producer/impl/pom.xml | 2 +- services/hv-ves-client/producer/pom.xml | 2 +- services/hv-ves-client/protobuf/pom.xml | 2 +- services/pom.xml | 2 +- standardization/api-custom-header/pom.xml | 2 +- standardization/moher-api/healthstate/pom.xml | 2 +- standardization/moher-api/metrics/pom.xml | 2 +- standardization/moher-api/pom.xml | 2 +- standardization/moher-api/server-adapters/pom.xml | 2 +- standardization/moher-api/server-adapters/reactor-netty/pom.xml | 2 +- standardization/moher-api/server-adapters/spring-webflux/pom.xml | 2 +- standardization/pom.xml | 2 +- version.properties | 2 +- 29 files changed, 37 insertions(+), 30 deletions(-) diff --git a/pom.xml b/pom.xml index 5510450f..1b5bd037 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.onap.dcaegen2.services sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT dcaegen2-services-sdk Common SDK repo for all DCAE Services diff --git a/rest-services/cbs-client/pom.xml b/rest-services/cbs-client/pom.xml index dd6d0788..a638cd27 100644 --- a/rest-services/cbs-client/pom.xml +++ b/rest-services/cbs-client/pom.xml @@ -7,7 +7,7 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT org.onap.dcaegen2.services.sdk.rest.services diff --git a/rest-services/dmaap-client/pom.xml b/rest-services/dmaap-client/pom.xml index 438a16dd..f57d3a10 100644 --- a/rest-services/dmaap-client/pom.xml +++ b/rest-services/dmaap-client/pom.xml @@ -7,7 +7,7 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT org.onap.dcaegen2.services.sdk.rest.services diff --git a/rest-services/http-client/pom.xml b/rest-services/http-client/pom.xml index 5eb6f210..22e35dc2 100644 --- a/rest-services/http-client/pom.xml +++ b/rest-services/http-client/pom.xml @@ -28,7 +28,7 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT org.onap.dcaegen2.services.sdk.rest.services diff --git a/rest-services/model/pom.xml b/rest-services/model/pom.xml index a2ad2065..ceb553a6 100644 --- a/rest-services/model/pom.xml +++ b/rest-services/model/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT org.onap.dcaegen2.services.sdk.rest.services diff --git a/rest-services/pom.xml b/rest-services/pom.xml index 914c9913..fa0f3431 100644 --- a/rest-services/pom.xml +++ b/rest-services/pom.xml @@ -7,7 +7,7 @@ org.onap.dcaegen2.services sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT org.onap.dcaegen2.services.sdk diff --git a/security/crypt-password/pom.xml b/security/crypt-password/pom.xml index 4e03d1e3..da037983 100644 --- a/security/crypt-password/pom.xml +++ b/security/crypt-password/pom.xml @@ -6,7 +6,7 @@ org.onap.dcaegen2.services.sdk.security dcaegen2-services-sdk-security - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT 4.0.0 diff --git a/security/pom.xml b/security/pom.xml index 70ad5a37..173c7c8f 100644 --- a/security/pom.xml +++ b/security/pom.xml @@ -7,7 +7,7 @@ org.onap.dcaegen2.services sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT org.onap.dcaegen2.services.sdk.security diff --git a/security/ssl/pom.xml b/security/ssl/pom.xml index 7ed8425e..febb8977 100644 --- a/security/ssl/pom.xml +++ b/security/ssl/pom.xml @@ -6,7 +6,7 @@ org.onap.dcaegen2.services.sdk.security dcaegen2-services-sdk-security - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT ssl diff --git a/services/external-schema-manager/pom.xml b/services/external-schema-manager/pom.xml index 67582246..3925e34d 100644 --- a/services/external-schema-manager/pom.xml +++ b/services/external-schema-manager/pom.xml @@ -7,7 +7,7 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-services - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT dcaegen2-services-sdk-services-external-schema-manager diff --git a/services/external-schema-manager/src/main/java/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/JsonFragmentRetriever.java b/services/external-schema-manager/src/main/java/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/JsonFragmentRetriever.java index 71f300fc..61865a14 100644 --- a/services/external-schema-manager/src/main/java/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/JsonFragmentRetriever.java +++ b/services/external-schema-manager/src/main/java/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/JsonFragmentRetriever.java @@ -28,6 +28,13 @@ final class JsonFragmentRetriever { } static JsonNode getFragment(JsonNode event, String fragmentPath) { - return event.at(fragmentPath); + String fragmentPathInSlashNotation = jsonToSlashNotation(fragmentPath); + return event.at(fragmentPathInSlashNotation); + } + + private static String jsonToSlashNotation(String fragmentPath) { + return fragmentPath + .replace(".", "/") + .replace("$",""); } } diff --git a/services/external-schema-manager/src/main/java/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/StndDefinedValidator.java b/services/external-schema-manager/src/main/java/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/StndDefinedValidator.java index 95bb575f..8d4e4bdb 100644 --- a/services/external-schema-manager/src/main/java/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/StndDefinedValidator.java +++ b/services/external-schema-manager/src/main/java/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/StndDefinedValidator.java @@ -74,8 +74,8 @@ public class StndDefinedValidator { public static final class ValidatorBuilder { public static final String DEFAULT_MAPPING_FILE_PATH = "etc/externalRepo/schema-map.json"; - public static final String DEFAULT_SCHEMA_REF_PATH = "/event/stndDefinedFields/schemaReference"; - public static final String DEFAULT_STND_DEFINED_DATA_PATH = "/event/stndDefinedFields/data"; + public static final String DEFAULT_SCHEMA_REF_PATH = "$.event.stndDefinedFields.schemaReference"; + public static final String DEFAULT_STND_DEFINED_DATA_PATH = "$.event.stndDefinedFields.data"; public static final String DEFAULT_SCHEMAS_PATH = "etc/externalRepo"; private String mappingFilePath = DEFAULT_MAPPING_FILE_PATH; diff --git a/services/external-schema-manager/src/main/test/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/JsonFragmentRetrieverTest.java b/services/external-schema-manager/src/main/test/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/JsonFragmentRetrieverTest.java index b5e3df69..6b70866d 100644 --- a/services/external-schema-manager/src/main/test/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/JsonFragmentRetrieverTest.java +++ b/services/external-schema-manager/src/main/test/org/onap/dcaegen2/services/sdk/services/external/schema/manager/service/JsonFragmentRetrieverTest.java @@ -45,7 +45,7 @@ class JsonFragmentRetrieverTest { //given JsonNode jsonContent = objectMapper.readTree(VALID_JSON_CONTENT); JsonNode expectedJsonNode = objectMapper.readTree("true"); - String validPath = "/validObject/someEvent/someObject"; + String validPath = "$.validObject.someEvent.someObject"; //when JsonNode actualJsonNode = JsonFragmentRetriever.getFragment(jsonContent, validPath); diff --git a/services/hv-ves-client/pom.xml b/services/hv-ves-client/pom.xml index d4826fff..31bb04f7 100644 --- a/services/hv-ves-client/pom.xml +++ b/services/hv-ves-client/pom.xml @@ -26,7 +26,7 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-services - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT dcaegen2-services-sdk-services-hvvesclient diff --git a/services/hv-ves-client/producer/api/pom.xml b/services/hv-ves-client/producer/api/pom.xml index 28b85d54..d65c52b8 100644 --- a/services/hv-ves-client/producer/api/pom.xml +++ b/services/hv-ves-client/producer/api/pom.xml @@ -26,7 +26,7 @@ org.onap.dcaegen2.services.sdk hvvesclient-producer - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT hvvesclient-producer-api diff --git a/services/hv-ves-client/producer/ct/pom.xml b/services/hv-ves-client/producer/ct/pom.xml index b39d4809..38ecb4e6 100644 --- a/services/hv-ves-client/producer/ct/pom.xml +++ b/services/hv-ves-client/producer/ct/pom.xml @@ -26,7 +26,7 @@ org.onap.dcaegen2.services.sdk hvvesclient-producer - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT hvvesclient-producer-ct diff --git a/services/hv-ves-client/producer/impl/pom.xml b/services/hv-ves-client/producer/impl/pom.xml index 4a6ad08e..a4bed9d0 100644 --- a/services/hv-ves-client/producer/impl/pom.xml +++ b/services/hv-ves-client/producer/impl/pom.xml @@ -26,7 +26,7 @@ org.onap.dcaegen2.services.sdk hvvesclient-producer - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT hvvesclient-producer-impl diff --git a/services/hv-ves-client/producer/pom.xml b/services/hv-ves-client/producer/pom.xml index 3de8f5f4..7d831606 100644 --- a/services/hv-ves-client/producer/pom.xml +++ b/services/hv-ves-client/producer/pom.xml @@ -26,7 +26,7 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-services-hvvesclient - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT hvvesclient-producer diff --git a/services/hv-ves-client/protobuf/pom.xml b/services/hv-ves-client/protobuf/pom.xml index 87556ca9..fade894e 100644 --- a/services/hv-ves-client/protobuf/pom.xml +++ b/services/hv-ves-client/protobuf/pom.xml @@ -26,7 +26,7 @@ dcaegen2-services-sdk-services-hvvesclient org.onap.dcaegen2.services.sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT High Volume VES Collector Client :: Protobuf diff --git a/services/pom.xml b/services/pom.xml index 0df80740..dea1ed86 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -26,7 +26,7 @@ org.onap.dcaegen2.services sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT org.onap.dcaegen2.services.sdk diff --git a/standardization/api-custom-header/pom.xml b/standardization/api-custom-header/pom.xml index ab911718..e50f61ee 100644 --- a/standardization/api-custom-header/pom.xml +++ b/standardization/api-custom-header/pom.xml @@ -7,7 +7,7 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-standardization - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT .. diff --git a/standardization/moher-api/healthstate/pom.xml b/standardization/moher-api/healthstate/pom.xml index a531e373..77f0f8f6 100644 --- a/standardization/moher-api/healthstate/pom.xml +++ b/standardization/moher-api/healthstate/pom.xml @@ -25,7 +25,7 @@ dcaegen2-sdk-moher-api org.onap.dcaegen2.services.sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT Monitoring and Healthcheck :: Health state diff --git a/standardization/moher-api/metrics/pom.xml b/standardization/moher-api/metrics/pom.xml index 03d40536..542f6f44 100644 --- a/standardization/moher-api/metrics/pom.xml +++ b/standardization/moher-api/metrics/pom.xml @@ -26,7 +26,7 @@ dcaegen2-sdk-moher-api org.onap.dcaegen2.services.sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT Monitoring and Healthcheck :: Metrics diff --git a/standardization/moher-api/pom.xml b/standardization/moher-api/pom.xml index 0ab6da66..c8db9572 100644 --- a/standardization/moher-api/pom.xml +++ b/standardization/moher-api/pom.xml @@ -26,7 +26,7 @@ dcaegen2-services-sdk-standardization org.onap.dcaegen2.services.sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT Monitoring and Healthcheck diff --git a/standardization/moher-api/server-adapters/pom.xml b/standardization/moher-api/server-adapters/pom.xml index c9cc67c6..e53bc5e7 100644 --- a/standardization/moher-api/server-adapters/pom.xml +++ b/standardization/moher-api/server-adapters/pom.xml @@ -25,7 +25,7 @@ dcaegen2-sdk-moher-api org.onap.dcaegen2.services.sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT Monitoring and Healthcheck :: Server Adapters diff --git a/standardization/moher-api/server-adapters/reactor-netty/pom.xml b/standardization/moher-api/server-adapters/reactor-netty/pom.xml index 298a7ea9..45b24132 100644 --- a/standardization/moher-api/server-adapters/reactor-netty/pom.xml +++ b/standardization/moher-api/server-adapters/reactor-netty/pom.xml @@ -25,7 +25,7 @@ dcaegen2-sdk-moher-server-adapters org.onap.dcaegen2.services.sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT Monitoring and Healthcheck :: Server Adapters :: Reactor Netty diff --git a/standardization/moher-api/server-adapters/spring-webflux/pom.xml b/standardization/moher-api/server-adapters/spring-webflux/pom.xml index a2c0a1c3..c58c50dc 100644 --- a/standardization/moher-api/server-adapters/spring-webflux/pom.xml +++ b/standardization/moher-api/server-adapters/spring-webflux/pom.xml @@ -25,7 +25,7 @@ dcaegen2-sdk-moher-server-adapters org.onap.dcaegen2.services.sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT Monitoring and Healthcheck :: Server Adapters :: Spring Webflux diff --git a/standardization/pom.xml b/standardization/pom.xml index c9be061a..3b16fcfd 100644 --- a/standardization/pom.xml +++ b/standardization/pom.xml @@ -8,7 +8,7 @@ org.onap.dcaegen2.services sdk - 1.4.2-SNAPSHOT + 1.4.3-SNAPSHOT .. diff --git a/version.properties b/version.properties index 6494452f..44b6acf6 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=1 minor=4 -patch=2 +patch=3 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg