sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-validation-test-services] 14/34: SLING-5373 allow to set severity per validator in the model
Date Fri, 20 Oct 2017 14:40:13 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit a6c6b7362b03fe83871cd649710db30a716c22d6
Author: Konrad Windszus <kwin@apache.org>
AuthorDate: Fri Mar 11 11:13:32 2016 +0000

    SLING-5373 allow to set severity per validator in the model
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1734530 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/validation/testservices/ValidationPostResponse.java   | 1 +
 .../resources/SLING-CONTENT/apps/sling/validation/models/model1.json   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
index 8cd45d8..c023f0e 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
@@ -62,6 +62,7 @@ public class ValidationPostResponse extends AbstractPostResponse {
                     JSONObject failureJson = new JSONObject();
                     failureJson.put("message", failure.getMessage(resourceBundle));
                     failureJson.put("location", failure.getLocation());
+                    failureJson.put("severity", failure.getSeverity());
                     failures.put(failureJson);
                 }
                 jsonResponse.put("failures", failures);
diff --git a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
index 85ad3bc..c7a70be 100644
--- a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
+++ b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
@@ -13,7 +13,8 @@
                 "jcr:primaryType" : "nt:unstructured",
                 "org.apache.sling.validation.impl.validators.RegexValidator": {
                     "jcr:primaryType" : "nt:unstructured",
-                    "validatorArguments" : ["regex=^\\\p{Upper}+$"]
+                    "validatorArguments" : ["regex=^\\\p{Upper}+$"],
+                    "severity" : "10"
                 }
             }
         },

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message