SLING-12094 - Use GitHub for the Maven scm.url value
1 file changed
tree: 87f40eeff224ed3d4821664071e00352b3dd0d59
  1. src/
  2. .asf.yaml
  3. .gitignore
  4. CODE_OF_CONDUCT.md
  5. CONTRIBUTING.md
  6. Jenkinsfile
  7. LICENSE
  8. pom.xml
  9. README.md
README.md

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.