Apache Sling Validation Framework Examples

Clone this repo:

Branches

  1. 980e085 Updating badges for org-apache-sling-validation-examples by Radu Cotescu · 9 months ago master
  2. 29c45d9 SLING-7245 - Validate pull requests using Jenkins by Robert Munteanu · 9 months ago
  3. 6ad88af trivial: added license header to *.md files by Radu Cotescu · 1 year, 1 month ago
  4. a20871a SLING-7215 - [nice-to-have] Add a CONTRIBUTING file to every module by Radu Cotescu · 1 year, 1 month ago
  5. a52123d SLING-7216 - [nice-to-have] Add a CODE_OF_CONDUCT file to every module by Radu Cotescu · 1 year, 1 month ago

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.