This repository has been archived by the owner on Dec 21, 2019. It is now read-only.
Releases: eclipsesource/play-json-schema-validator
Releases · eclipsesource/play-json-schema-validator
v0.9.6-M1
v0.9.5
v0.9.5-M4
v0.9.5-M3
v0.9.5-M2
- Include meta schemas for v4 and v7 by default (fixes #129). For this to work you need to explicitly pass the desired version to the validator, e.g.
val validator = SchemaValidator(Some(Version7))
- Make ref resolver treat absolute refs with # and without # at the end equivalent (see https://tools.ietf.org/html/draft-handrews-json-schema-01#section-8.2.4 for examples)
- Remove obsolete methods related to relative URL handlers
- Consolidate utility functions for error creation and reporting
v0.9.5-M1
- Adds Support for v7
Note that in contrast to to v4, v7 support does not resolve external references automatically any more (as described here). You can add all schemas to be known viaaddSchema
:
import com.eclipsesource.schema.drafts.Version7
// add geo schema to known schemas
val validator = SchemaValidator(Some(Version7))
.addSchema("http://json-schema.org/geo", geoSchema)
Alternatively, override default option supportsExternalReferences
:
val options = new SchemaConfigOptions {
// override option
override def supportsExternalReferences: Boolean = true
override def formats: Map[String, SchemaFormat] = DefaultFormats.formats
}
val validator = SchemaValidator(Some(Version7(options)))
SchemaValidator
now also takes an optional Version argument, which determines the version to be used. If it is omitted the version will be determined via the $schema keyword in the schema if applicable, otherwise it falls back to using v7.
- Schema Reads are more strict and report errors in case the expected type of a
SchemaType
differs instead of trying to parse by best effort means (which often resulted in schema objects with empty properties) - Fix failing v4 tests by fixing $ref resolving. Introduce
SchemaRef
as AST node. - Rename
origin
toreferrer
in error reports - Add
validate
overload withSource
as parameter
v0.9.4
Add cross-build support for Scala 2.11
v0.9.3
Update to Play 2.6
v0.9.2
- Update for Play JSON 2.6.0 RC 2