You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:24:41 UTC

[sling-org-apache-sling-validation-test-services] 16/33: SLING-5373 allow to set severity per validator in the model

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

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

commit a449cb4b8d6d68bb31ebed83354f4e2a0ec36f16
Author: Konrad Windszus <kw...@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/bundles/extensions/validation/test-services@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" <co...@sling.apache.org>.