Tools for transforming OData CSDL XML ($metadata) files into JSON Schema documents.
The core ingredient is the V4-CSDL-to-JSONSchema.xsl
transformation.
This script transforms all XML files given as parameters into JSON Schema documents and verifies that the produced JSON Schema documents are well-formed.
The prerequisites are listed within transform.cmd
. It's quite a lot:
- Java SE is installed and in the
PATH
- git is installed and in the
PATH
- Xalan is installed and
CLASSPATH
containsxalan.jar
andserializer.jar
- YAJL's
json_reformat
has been compiled and is in thePATH
- Node.js is installed
- ajv-cli is installed
In the tools
folder execute
transform ..\examples\*.xml
This script validates example OData responses against the JSON Schema documents generated by transform.cmd
.
In the tools
folder execute
validate