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
uniqueItemskeyword withfalsevalue 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.jsonto 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
ProblemPrinterBuildernow skip intermediate problems if and only if they have only one branch of problems. - Revised the problem message emitted by
containskeyword.
Fixed
- A bug which was causing
AssertionErrorwhenenumkeyword is used inpropertyNameskeyword. (Issue #38 reported by @DMittenMalwareBytes)
v1.1.0
1.1.0 - 2019-08-16
Added
printProblems(PrintStream)andprintProblems(PrintWriter)methods toJsonValidatingExceptionclass.print()method toProbleminterface.
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
Keywordinterface which represents a keyword contained in a JSON schema.ObjectJsonSchemainterface which is a JSON schema represented by a JSON object. This type can be viewed as an immutable map ofKeywordinstances.JsonSchema.asObjectJsonSchema(), which can cast an instance ofJsonSchematoObjectJsonSchema.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.JsonParsercreated 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 underlyingJsonProviderinstance 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.jsonwith its classifier asmodule. - The constant
JsonSchema.EMPTYnow 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 throwNullPointerExceptioninstead ofIllegalStateExceptionwhen the method was called before the initial invocation ofnext(). - A bug which was causing the order of values given by
typekeyword 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.
SpecVersionenum 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
$schemakeyword 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.ValidationConfiginterface to build configuration properties, which can be passed toJsonParserFactoryorJsonReaderFactorytype.
Changed
typeparameters inJsonSchema.createEvaluator()andJsonSchema.createNegatedEvaluator()now receiveInstanceType.NUMBERinstead ofInstanceType.INTEGERfor integer type.FormatAttribute.valueType()now must returnInstanceType.NUMBERinstead ofInstanceType.INTEGERfor integer type.
Removed
JsonValidatorFactoryBuildertype introduced in the previous release. This type is superseded by newValidationConfig.
Fixed
- A bug of
oneOfwhich 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)