Skip to content

Releases: erosb/json-sKema

Lenient mode bugfixes

11 Nov 05:13

Choose a tag to compare

Multiple fixes related to lenient validation:

  • fix ArrayIndexOutOfBoundsException when trying to validate an empty string against a number/integer schema
  • handle numeric literals starting with a + sign
  • handle "integer" schema validation and strings representing floating point numbers

Improved fomat validators

03 Oct 03:47

Choose a tag to compare

Improvements

  • improved "uuid" and "date-time" format validation - contributed by @sangamon
  • dependency upgrades

Lenient mode support

28 Sep 18:17

Choose a tag to compare

Improvements

  • Lenient mode support
  • Dependency upgrades
  • handling "additionalProperties" validation failures more consistently with other keywords
  • improve toString() implementations so that empty objects and arrays don't contain unnecessary newline characters

Bugfixes

  • Properly closing Reader instance after reading a raw schema json while resolving a remote $ref

Parser perfomance improvements

16 Aug 16:38

Choose a tag to compare

Optimizing the JsonParser class (it became roughly 10x faster).

Replace apache commons-validator with JMail

04 Aug 07:18

Choose a tag to compare

This release removes the apache commons-validator dependency from the project, and introduces JMail for validating IP address and email formats.

Improve DynamicPath support

28 May 03:34

Choose a tag to compare

Improvements

With this release, the dynamicPath field of ValidationFailure provides more information about the dynamic path being traversed during the validation process, including the URI of the root schema document's URI, where the validation process started.

Fix escaping in JsonPointer.toString()

26 Apr 20:32

Choose a tag to compare

v0.22.0

bump version number

Maintenance release - dependency updates

04 Mar 11:27

Choose a tag to compare

Dynamic Path support

20 Dec 08:33

Choose a tag to compare

New feature

  • Validation failures now tell what path was traversed in the schema, until the validation error was found, in the ValidationFailure.dynamicPath property.

Other improvements and bugfixes

  • fix signature of FormatValidator interface to return FormatValidationFailure instead of ValidationFailure (this might be a very minor BC-break)
  • parser improvements:
    • not accepting malformed json with missing commas in array elements - bugfix contributed by @soumyajit-sahu , congrats!
    • throwing exception on duplicate keys
  • dependency upgrades (only patch versions)

YAML support

30 Oct 19:27

Choose a tag to compare

Intro

This release is bigger than the usual updates of the library. The main direction of the recent developments was to support an OpenAPI library called Kappa, which is a refreshment (permanent fork) of the archived openapi4j project.

With that in mind, the main goal was to support loading of JSON Schema documents written in YAML.

Improvements

  • it is now possible to load schema documents written in YAML, SchemaLoader fully supports loading YAML content
  • prevent infinite recursion and StackOverflowError caused by very deeply nested JSON structures (this treshold is 100_000 nesting levels by default, adjustable in JsonParser constructors)
  • documentSource URI is now mandatory in every JsonValue instance, by default it is mem://input
  • JsonParser now has a constructor which accepts a Reader instance
  • add SchemaClient.createDefaultSchemaClient() which is easy to use by custom implementations to delegate to
  • making internal SchemaClient implementations public
  • added ValidationFailure.flatten() which returns the leaf nodes of the failure hierarchy, as a list

Bugfix

  • fixes indentation issue in ValidationFailure.toString()

Breaking changes

  • the type of SchemaLoaderConfig.initialBaseURI changed from String to URI.
  • the type of DEFAULT_BASE_URI changed from String to URI