SLING-7245 - Validate pull requests using Jenkins
1 file changed
tree: b4c0c59fe6bd48332c4637942de1c4aaf2c2069d
  1. src/
  2. .gitignore
  3. CODE_OF_CONDUCT.md
  4. CONTRIBUTING.md
  5. Jenkinsfile
  6. LICENSE
  7. pom.xml
  8. README.md
README.md

Build Status License validation

Apache Sling Validation Framework Examples

This module is part of the Apache Sling project.

How To Run the Examples

  1. Start a Sling launchpad

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

    cd ../api
    mvn clean package sling:install
    cd ../core
    mvn clean package sling:install
    cd ../examples
    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.