This repository includes examples to test AMF "validation" feature.
Node JS:
$ npm install
Java:
$ mvn install
Node JS:
$ node src/main/js/DataExample.js
(...)
Java:
$ java -cp ./target/amf-validation-example-1.0-SNAPSHOT-jar-with-dependencies.jar com.mulesoft.amf.examples.ValidationExample
(...)
- Validation Example (JavaScript/Java): Shows how validation and custom validation can be executed programmatically
- Data Example (JavaScript/Java): Shows how AMF can be used to create a data model graph with the information from the API and the validation profile
The examples folder contains a sample RAML API as well as a sample custom Validation Profile that can be used to test the library and as a starting point to test more complex validations. Also, sample (SPARQL) queries over the data model graph can be found in the queries directory.
- a short introduction to AMF
- the validation mechanism: how to use it from both the command line and programmatically, as well as how to create custom validations