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 14:16:46 UTC

[unomi] branch UNOMI-775-add-validation-endpoint updated (fd335f79a -> 5047123dc)

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 fd335f79a feedback 2
     new 5047123dc 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   (fd335f79a)
            \
             N -- N -- N   refs/heads/UNOMI-775-add-validation-endpoint (5047123dc)

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:
 .../main/java/org/apache/unomi/schema/impl/SchemaServiceImpl.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


[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 5047123dc0acac469d4e5f55afe10326bf63c114
Author: jsinovassin <js...@jahia.com>
AuthorDate: Tue May 2 15:48:14 2023 +0200

    feedback 2
---
 .../main/java/org/apache/unomi/schema/impl/SchemaServiceImpl.java    | 5 ++++-
 1 file changed, 4 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..22db5b30d 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,10 @@ public class SchemaServiceImpl implements SchemaService {
 
     @Override
     public Set<ValidationError> validateEvent(String event) throws ValidationException {
-        return validateNodeEvent(parseData(event));
+        return validateEvents("[" + event + "]").values().stream().reduce(new HashSet<>(), (errors, errorsToAdd) -> {
+            errors.addAll(errorsToAdd);
+            return errors;
+        });
     }
 
     @Override