- Add partial support for JSON Schema draft 2019-09 and draft 2020-12. New
dialect modules
jesse_validator_draft2019_09andjesse_validator_draft2020_12, dispatched from the schema's$schemaURI (https://json-schema.org/draft/2019-09/schemaand.../2020-12/schema, with or without a trailing#). Implemented keywords:dependentRequired,dependentSchemas,if/then/else,minContains/maxContains,$defs, local$anchorresolution,$refevaluated alongside sibling keywords, andunevaluatedProperties/unevaluatedItems(with the full annotation model — adjacent keywords and successful in-place applicators contribute, cousins/uncles do not). Draft 2020-12 additionally handles theprefixItemsrename (tuple validation) anditemsas the after-prefixItemsapplicator.formatis annotation-only (non-asserting), per the dialect default. Not yet implemented —$recursiveRef(2019-09) and$dynamicRef(2020-12) — raise akeyword_not_supportedschema error instead of being silently ignored, so they can never false-accept invalid data. Validated against the official JSON-Schema-Test-Suite: 927/1003 individual draft 2019-09 tests and 935/997 draft 2020-12 tests pass; the remainder are for$recursiveRef/$dynamicRef, remote-schema fetching, and in-document$idscoping.
- Improving the error messages from jesse when using oneOf/anyOf
- Make it compatible with jsx 3.0
- Fix rebar3 and rebar3_hex versions incompatibility #88
- OTP-22.3 added to Travis
- Specify build matrix "dist" for old OTP releases #83
- Fix anyOf / OneOf returns unexpected error with allowed_errors=infinity #81
- Fixes for dialyzer #77
- Ensure correct dependencies in app.src
- OTP-22 added to Travis
- Avoid deprecated http_uri functions for OTP 21+ #86
- Migrate to rebar3 #87
- Drop support for OTP versions below OTP-18
- Work around unexported
http_uri:uri()type #75 - Add validator draft3/draft4 schema unique check missed case #74
- Add missing error types to handle json parser exceptions #73
- Upgrade jsx dependency #67
- Stacktrace compatibility macro updated #70
- Correct schema on error #65
- OTP-21 compatibility #66
- errors are now returned in the order they occur
- specifying any other properties in a schema with a
$refthrows an error #47 #54
- default schema loader now supports
file:,http:andhttps:URI schemes. When a schema cannot be found in the internal storage, a schema hosted under one of the supported URI schemes will be fetched and stored. To maintain the old behavior (internal storage only) give the optionschema_loader_funthe valuefun jesse_database:load/1 - RFC 3339 validator for date and time formats
- a schema referenced by
$refcan now follow a different JSON Schema draft than the parent - allow an external validator to be given as option e.g. to verify runtime requirements #42
- schema id needs to be a fully qualified URI. jesse will build a canonical one otherwise based on the context - parent schema's id, loading path, etc.
Full list of changes since 1.4.0
- Added jesse_error:to_json
- Spec fixes
- Test improvements
- Support for maps
- Standalone jesse executable (with Erlang/JSON output)
- Support for $ref
- Support for JSON Schema draft 4
- Big refactoring
- Start to respect $schema
- Add possibility of adding validators for different schemas
- Start using semantic versioning (http://semver.org/)
- Minor improvements
- Add path to errors (error format changed, so it's backward incompatible change)
- Change API
- Introduce 'state' in the validator
- Add possibility to collect errors
- Change errors format
- Add support for jsx format
- Big refactoring of jesse_schema_validator.erl
- Add additional API functions
- Add tests
- Add more documentation
- Initial release.