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:
swagger-schema-validator.core/valid?
and
swagger-schema-validator.core/explain
These both take the following arguments:
"/definitions/item"
)The explain
function returns a (possibly empty) list of errors and warnings.
See the test namespace for usage examples.
Copyright © 2018 Mikkel Gravgaard
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close