Releases: leadpony/justify
Releases · leadpony/justify
v3.1.0
v3.0.0
v3.0.0-RC2
3.0.0-RC2 - 2020-05-12
This is a pre-release because the Jakarta JSON Processing API is also a pre-release.
Added
- A new API
JsonValidationService.newInstance(JsonProvider)
.
Fixed
- A bug that was causing
uniqueItems
keyword withfalse
value to produce wrong validation result.
v3.0.0-RC1
3.0.0-RC1 - 2020-04-27
This is a pre-release because the Jakarta JSON Processing API is also a pre-release.
Changed
- Updated Jakarta JSON Processing API to 2.0.0, which causes the API package
javax.json
to be migrated tojakarta.json
.
Fixed
- Fixed a bug which was causing automatic detection of schema version to fail.
v2.1.0
2.1.0 - 2020-04-02
Added
- New API for reading JSON and JSON schema with a JsonParser as a source. Contributed by @simon-greatrix
JsonValidationService.readSchema(JsonParser)
JsonValidationService.createParser(JsonParser, JsonSchema, ProblemHandler)
JsonValidationService.createReader(JsonParser, JsonSchema, ProblemHandler)
JsonSchemaReaderFactory.createSchemaReader(JsonParser)
Changed
v2.0.0
2.0.0 - 2019-11-23
Added
- The problem messages are translated into Simplified Chinese by @letui.
Changed
- All the branching problems are now preserved even when they have only one branch of problems (Issue #37 reported by @adityamandhare).
- Problem printers built with
ProblemPrinterBuilder
now skip intermediate problems if and only if they have only one branch of problems. - Revised the problem message emitted by
contains
keyword.
Fixed
- A bug which was causing
AssertionError
whenenum
keyword is used inpropertyNames
keyword. (Issue #38 reported by @DMittenMalwareBytes)
v1.1.0
1.1.0 - 2019-08-16
Added
printProblems(PrintStream)
andprintProblems(PrintWriter)
methods toJsonValidatingException
class.print()
method toProblem
interface.
Changed
- [CLI] Now uses Joy as a JSON-P implementation.
Fixed
JsonValidatingException.getMessage()
now correctly returns a message describing all problems including problems on any branch. (Issue #23 reported by @gustabart)- A bug which was causing schema readers to report too many problems when they are created with
withStrictKeywords()
enabled. (Issue #25)
v1.0.0
1.0.0 - 2019-07-15
Added
- Added
JsonSchemaReaderFactoryBuilder.withMetaschema()
which can be used to explicitly specify metaschema against which JSON schemas will be validated while being read. (Issue #19 proposed by @dszier)
Changed
- The single parameter of
Keyword.getValueAsJson()
was removed. JsonSchemaBuilder.withDependencies()
now accepts aMap<String, ?>
typed parameter instead ofMap<String, Object>
.JsonSchemaReaderFactoryBuilder.withStrictWithFormats()
was renamed towithStrictFormats()
.JsonSchemaReaderFactoryBuilder.withStrictWithKeywords()
was renamed towithStrictKeywords()
.- [CLI] Revised console messages.
Fixed
- Now every JSON schema and schema keyword retains its original JSON representation correctly, including custom keywords.
v0.17.0
0.17.0 - 2019-06-09
Added
Keyword
interface which represents a keyword contained in a JSON schema.ObjectJsonSchema
interface which is a JSON schema represented by a JSON object. This type can be viewed as an immutable map ofKeyword
instances.JsonSchema.asObjectJsonSchema()
, which can cast an instance ofJsonSchema
toObjectJsonSchema
.JsonSchema.getJsonValueType()
, which returns the value type of JSON value returned bytoJson()
.JsonSchema.getKeywordValue(String)
andJsonSchema.getKeywordValue(String, JsonValue)
, both return the value of the specified schema keyword as aJsonValue
.JsonParser
created byJsonParserFactory.createParser(JsonArray)
orJsonParserFactory.createParser(JsonObject)
now can validate the value even when using this library with the JSON-P Reference Implementation. (Issue #14 reported by @atomictag)JsonValidationService.getJsonProvider()
which returns the underlyingJsonProvider
instance used by the service.
Changed
- The Maven coordinates of the dependency which provides the JSON Processing API was now migrated to
jakarta.json:jakarta.json-api
. When using this library with the Reference Implementation, the Maven coordinates of the implementation now should beorg.glassfish:jakarta.json
with its classifier asmodule
. - The constant
JsonSchema.EMPTY
now has a type ofObjectJsonSchema
.
Fixed
- A bug which was causing unrecognized keywords to disappear from the effective schema. Note that ill-formed keywords reserved in the JSON Schema specification are not retained even in this release. This restriction should be fixed in the future release. (Issue #16 reported by @atomictag)
- A bug which was causing
JsonParser.getString()
to throwNullPointerException
instead ofIllegalStateException
when the method was called before the initial invocation ofnext()
. - A bug which was causing the order of values given by
type
keyword to be changed while reading schemas.
v0.16.0
0.16.0 - 2019-04-21
Added
- Full support of JSON Schema specification Draft-06 and Draft-04.
SpecVersion
enum type to define the supported versions of JSON Schema specification.JsonSchemaReaderFactoryBuilder.withDefaultSpecVersion()
to specify the default version of JSON Schema specification.- Automatic detection of the JSON Schema specification version based on the
$schema
keyword values. This feature is enabled by default and can be disabled withJsonSchemaReaderFactoryBuilder.withSpecVersionDetection()
. JsonSchemaReaderFactoryBuilder.withSchemaValidation()
to enable or disable the validation of schemas against the metaschemas. By default this option is enabled as before.ValidationConfig
interface to build configuration properties, which can be passed toJsonParserFactory
orJsonReaderFactory
type.
Changed
type
parameters inJsonSchema.createEvaluator()
andJsonSchema.createNegatedEvaluator()
now receiveInstanceType.NUMBER
instead ofInstanceType.INTEGER
for integer type.FormatAttribute.valueType()
now must returnInstanceType.NUMBER
instead ofInstanceType.INTEGER
for integer type.
Removed
JsonValidatorFactoryBuilder
type introduced in the previous release. This type is superseded by newValidationConfig
.
Fixed
- A bug of
oneOf
which was causing the validation to produce false result in case that two or more subschemas are evaluated eventually as valid by different parser events. (Issue #13)