Simple REST-service for validating JSON documents against JSON Schemas
Install scala-sbt (http://www.scala-sbt.org/download.html)
POST /schema/SCHEMAID - Upload a JSON Schema with unique `SCHEMAID`
GET /schema/SCHEMAID - Download a JSON Schema with unique `SCHEMAID`
POST /validate/SCHEMAID - Validate a JSON document against the JSON Schema identified by `SCHEMAID`
The following commands are executed from within the base directory (directory containing the build.sbt file)
sbt compile
sbt run
curl http://localhost:9000 (returns the API)
sbt test
sbt clean coverage test coverageReport
Or from sbt console:
;clean ;coverage ;test ;coverageReport
Results will be available in target/scala-2.12/scoverage-report/index.html
In-memory H2 database-config (in application.conf
) => restart the app will lose the stored schemas