Skip to content

0.15.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@ssilverman ssilverman released this 30 Oct 07:41
· 13 commits to master since this release

Added

  • Added an "Internal APIs" section to the README. This mentions useful classes and methods for use in one's own projects.
  • The test suite runner can now optionally dump all the errors and annotations.
  • Added a new Locator class that encapsulates instance and schema locations. Annotation and Error use this.
  • New JSON.print methods for outputting a JSON element. There is one for an OutputStream and one for a Writer. Coverage, Linter, Main, and Test were changed to use this function for their output.
  • New linter rules:
    1. Added a check for case-insensitive matching for unknown keywords.
    2. Added implied type checks for "default" and "const".
    3. Check for non-unique enums.
    4. Checks for empty "enum", "allOf", "anyOf", and "oneOf".
  • New Results utility class for post-processing annotations and errors into useful results.
  • A rudimentary way to translate ECMA-262 regexes into Java-compatible regexes so that we can pass the optional ECMA-262 regex tests. This is done internally.
  • Added module information:
    • Exporting:
      1. com.qindesign.json.schema
      2. com.qindesign.json.schema.net
    • Requiring transitively:
      1. com.google.gson

Changed

  • Updated to the latest Draft 2019-09 and Draft-06 schemas.
  • Changed the schema resource hierarchy so that it matches the JSON Schema upstream hierarchy.
  • Restructured annotations and errors. Annotation was split into the parameterized Annotation and Error classes. Error replaces the ValidationResult Annotation value.
  • Changed the linter to output JSON.
  • Changed the library used to find Keyword implementation classes. Now using ClassGraph instead of Guava. This somewhat reduces the dependency size.
  • When examining URLs during auto-resolution, the empty path case is now ignored. Before, just a check for an ending "/" was performed. The goal is not to resolve a non-schema file.
  • README and Javadoc updates.
  • Improved auto-resolution:
    1. If checking a URI against the base URI yields nothing, an attempt will now be made to try the URI itself as a URL.
    2. $recursiveRef was added to reference scanning candidates.
    3. Absolute referenced URI's are now added to the list of known URLs in the scan phase; before, any URI's having a scheme or authority were not added to the list of guessable URLs.
  • Renamed package com.qindesign.net to com.qindesign.json.schema.net for more specificity.
  • Updated dependency versions:
    1. ICU4J: 67.1 -> 68.1
  • Updated the Javadocs with proper external links.

Fixed

  • The validator context now knows when it's validating a meta-schema. CoreVocabulary was fixed to ignore the keyword if the current schema isn't being treated as a meta-schema.
  • A check for validator creations throwing an IllegalArgumentException was added to the test suite runner.
  • Because the validator now may add absolute URIs to the list of a schema's known IDs, the context was fixed to first check an ID's base URI, in addition to checking that it has an empty path, before deciding it's the root ID.