Scala JSON Schema Validator

App

Deployed on Heroku live. Developed mainly with

  • Scalatra
  • MongoDB

Development requirements

  • Scala Version 2.12
  • sbt (Developed with version 1.2.1)
  • MongoDB 3.4 (Probably will work also with 3.6)

Basic Endpoints

  • 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

Local setup

  1. Clone the repo
  2. Have a mongod instance running
  3. Then run:
$ cd json-schema-validator
$ sbt
> jetty:start

Open http://localhost:8080/ in your browser.

Code reloading

To enable automatic code reloading enter:

> ~;jetty:stop;jetty:start

Linting & formatting

Currently the repo is using Scalafmt with standard rules and Scalastyle for basic linting.