This Clojure library validates JSON objects against models defined in the definitions section of a Swagger 2 specification
It is a simple wrapper for the Java library at https://github.com/bjansen/swagger-schema-validator
API has two functions:
These both take the following arguments:
- a swagger schema as a json string
- a pointer to the definition to use (eg
- a blob of json as a string
explain function returns a (possibly empty) list of errors and warnings.
See the test namespace for usage examples.
- Make a command line interface
- Accept schema as yaml
- Deploy to Clojars :-)
Copyright © 2018 Mikkel Gravgaard
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.