circe-json-schema icon indicating copy to clipboard operation
circe-json-schema copied to clipboard

Newer json-schema versions support

Open jeet23 opened this issue 1 year ago • 2 comments

The version supported in this library is currently draft 7 from json-schema but there are newer versions available. Ideally, it would be great to support the latest 2020-12 json-schema version.

Some examples of schemas that are not present in this library as of now:

  • string with uuid format

jeet23 avatar Aug 29 '23 11:08 jeet23

Along with this, the everit library that this project uses to understand JSON schema is end-of-life. The maintainers of that library recommend switching to json-skema instead. The only caveat is that the new library only supports the latest draft specification, and some schemas that were valid under everit might not be under json-skema. (We ran into this problem in another project that uses everit directly).

Would the project maintainers be open to a PR to switch the underlying library? This also relates to #8 issue.

aelfric avatar Oct 05 '23 10:10 aelfric

Hello, I'm the maintainer of both the everit-org/json-schema and erosb/json-sKema libraries, I just found this project. I'd like to share a few thoughts:

  • to use the everit library, you don't need the jitpack resolver anymore, it is now distributed on maven central with the com.github.erosb:everit-json-schema coordinates
  • I understand that you need to support both draft-7 (and earlier) and 2020-12 versions. Maybe you could have 2 main versions of this library, 1.x staying on the everit library (hence draft-7) and 2.x migrated to erosb/json-sKema
  • the json-sKema library offers better programmatic consumption of the validation, for example this kind of parsing can be avoided

erosb avatar Jun 25 '24 14:06 erosb