Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Latest commit

 

History

History
39 lines (28 loc) · 1.43 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.43 KB

AMF Validation Example

This repository includes examples to test AMF "validation" feature.

Install

Node JS:

$ npm install

Java:

$ mvn install

Run the examples

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.

Documentation

  • 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