ex_json_schema icon indicating copy to clipboard operation
ex_json_schema copied to clipboard

No support for dependentRequired

Open AntoineAugusti opened this issue 3 years ago • 2 comments

Hello,

First, thanks a lot for providing this library! We @ https://transport.data.gouv.fr are happy to use it daily in production.

Opening an issue to note that dependentRequired (conditionally requires that certain properties must be present if a given property is present in an object) is not checked by the current version of this library and we got surprised by this.

It may be because you need to support newer versions of the spec, as discussed in https://github.com/jonasschmidt/ex_json_schema/issues/73.

AntoineAugusti avatar Apr 28 '22 09:04 AntoineAugusti

In the 2019-09 release notes https://json-schema.org/draft/2019-09/release-notes.html#semi-incompatible-changes

dependencies has been split into dependentSchemas and dependentRequired

AntoineAugusti avatar Apr 28 '22 11:04 AntoineAugusti

Hey, the support for dependentRequired was added in the 2019-09 schema draft (see release notes here: https://json-schema.org/draft/2019-09/release-notes.html). You already found the issue about adding support for the 2019-09 and 2020-12 drafts. Unfortunately it's not there yet and could take a bit of time to finish. Sorry I don't have better news 😬

jonasschmidt avatar May 03 '22 13:05 jonasschmidt