You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by js...@apache.org on 2023/05/02 13:55:24 UTC

[unomi] branch UNOMI-775-add-validation-endpoint updated (25a109eb4 -> 245d3508b)

This is an automated email from the ASF dual-hosted git repository.

jsinovassinnaik pushed a change to branch UNOMI-775-add-validation-endpoint
in repository https://gitbox.apache.org/repos/asf/unomi.git


 discard 25a109eb4 feedback 2
     new 245d3508b feedback 2

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (25a109eb4)
            \
             N -- N -- N   refs/heads/UNOMI-775-add-validation-endpoint (245d3508b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/unomi/schema/impl/SchemaServiceImpl.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


[unomi] 01/01: feedback 2

Posted by js...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jsinovassinnaik pushed a commit to branch UNOMI-775-add-validation-endpoint
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 245d3508be081efd7bd073993262e5c51c4f6c64
Author: jsinovassin <js...@jahia.com>
AuthorDate: Tue May 2 15:48:14 2023 +0200

    feedback 2
---
 .../src/main/java/org/apache/unomi/schema/impl/SchemaServiceImpl.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/extensions/json-schema/services/src/main/java/org/apache/unomi/schema/impl/SchemaServiceImpl.java b/extensions/json-schema/services/src/main/java/org/apache/unomi/schema/impl/SchemaServiceImpl.java
index d4b695a4d..7a98a7b52 100644
--- a/extensions/json-schema/services/src/main/java/org/apache/unomi/schema/impl/SchemaServiceImpl.java
+++ b/extensions/json-schema/services/src/main/java/org/apache/unomi/schema/impl/SchemaServiceImpl.java
@@ -114,7 +114,8 @@ public class SchemaServiceImpl implements SchemaService {
 
     @Override
     public Set<ValidationError> validateEvent(String event) throws ValidationException {
-        return validateNodeEvent(parseData(event));
+        Map<String, Set<ValidationError>> errors = validateEvents("[" + event +"]");
+        return !errors.isEmpty() ? errors.entrySet().iterator().next().getValue() : new HashSet<>();
     }
 
     @Override