Apache Sling Validation Framework Examples

Clone this repo:

Branches

  1. 2ec2274 SLING-12094 - Use GitHub for the Maven scm.url value by Robert Munteanu · 7 months ago master
  2. fc769ea SLING-11709 - Set up Jira autolinks to all Sling Github projects by Robert Munteanu · 1 year, 1 month ago
  3. 547ac17 SLING-11051 - Fixing JavaDoc badge by Dan Klco · 2 years, 4 months ago
  4. 162c2b0 Update to parent 46 by Konrad Windszus · 2 years, 5 months ago
  5. 07a7581 SLING-10676 - remove SECURITY.md which is not needed by Bertrand Delacretaz · 2 years, 9 months ago

Apache Sling

Build Status Coverage Sonarcloud Status validation License

Apache Sling Validation Framework Examples

This module is part of the Apache Sling project.

How To Run the Examples

  1. Start a Sling Starter (or some other distribution)

  2. Install the org.apache.sling.validation.api and org.apache.sling.validation.core bundles

  3. Build and install the org.apache.sling.validation.examples bundle

    mvn clean package sling:install
    

Invalid POST request

curl -u admin:admin -Fsling:resourceType=/apps/validationdemo/components/user -Fusername=johnsmith -FfirstName=John204 -FlastName=Smith http://127.0.0.1:8080/content/validationdemo/users/johnsmith.modify.html

Check that the resource has not been modified at http://127.0.0.1:8080/content/validationdemo/users/johnsmith.html.

Valid POST request

curl -u admin:admin -Fsling:resourceType=/apps/validationdemo/components/user -Fusername=johnsmith -FfirstName=Johnny -FlastName=Bravo http://127.0.0.1:8080/content/validationdemo/users/johnsmith.modify.html

Check that the resource has been modified at http://127.0.0.1:8080/content/validationdemo/users/johnsmith.html.