Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Adds partial implementation of AJV Extension proposal for JSON schema

Latest
Compare
Choose a tag to compare
@JoaoCamposFrom94 JoaoCamposFrom94 released this 14 Jan 18:27
· 2 commits to master since this release

Major changes:

  • Partial support for a modified AJV Extension proposal (check the detailed notes). Implemented string extensions:
    • Dates
    • Times
    • Datetimes
  • AJV Extension proposal is now the default option.

Detailed notes

Partial implementation of the AJV Extension proposal as defined here AJV with slight modifications. Currently from the AJV extensions only the string section is implemented. It allows comparison of dates, times and datetimes as string objects.
Date should be a complete date ISO 8601 (e.g. YYYY-MM-DD). Time should be in ISO 8601 (e.g. 11:13:06+00:00 or UTC 11:13:06Z). Datetime should be ISO 8601 in the form T.

formatMaximum: No change. It states that formatMaximum should be the latest date accepted, excluding the same temporal unit.
formatMinimum: No change: It states that formatMinimum should be the earliest date accepted, excluding the same temporal unit.
exclusiveFormatMaximum: Modified. This field should also be a string with a temporal unit of the above format.
exclusiveFormatMinimum: Modified. This field should also be a string with a temporal unit of the above format.
You may use a combination of any of the constrainsts above as they are evaluated indenpendent of each other, for instance to define a range of accepted values.