Self plug: json-schema-validator now has draft v4 support

454 views
Skip to first unread message

Francis Galiegue

unread,
Nov 11, 2012, 2:31:29 PM11/11/12
to json-...@googlegroups.com
Hello,

Still no hyperschema support, but complete draft v4 support is now
here as of 1.3.3:

https://github.com/fge/json-schema-validator

The implementation also switches automatically schema versions
depending on $schema (it is still draft v3 by default), and you can
define entirely new schemas by yourself (with associated core schema
URI and everything). It also supports complete id addressing as
defined by draft v3 (what draft v4 names "inline addressing", although
this is not the default for security reasons.

There is now also a complete set of examples demonstrating the above
addressing capability and more:

https://github.com/fge/json-schema-validator/tree/master/src/main/java/org/eel/kitchen/jsonschema/examples

Have fun,
--
Francis Galiegue, fgal...@gmail.com
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)

Brad Cox

unread,
Nov 11, 2012, 4:33:02 PM11/11/12
to json-...@googlegroups.com
Hi Francis. Could you please publish this to maven central? Thanks! 

Latest there is 1.3.2 (updated 09-Nov-2012; how can that be; 3 days ago?) Confusing; its 1.3.4-SNAPSHOT in git's pom.

Francis Galiegue

unread,
Nov 11, 2012, 4:52:16 PM11/11/12
to json-...@googlegroups.com
On Sun, Nov 11, 2012 at 10:33 PM, Brad Cox <brad...@gmail.com> wrote:
> Hi Francis. Could you please publish this to maven central? Thanks!
>
> Latest there is 1.3.2 (updated 09-Nov-2012; how can that be; 3 days ago?)
> Confusing; its 1.3.4-SNAPSHOT in git's pom.

Hello,

I have pushed it, however I use sonatype and don't know how often it
is synchronized with maven central. On maven search engines, the
version is so old it's not even funny...

From what you say, it seems to be rather infrequent, no idea why :/

Francis Galiegue

unread,
Nov 11, 2012, 5:20:20 PM11/11/12
to json-...@googlegroups.com
On Sun, Nov 11, 2012 at 10:33 PM, Brad Cox <brad...@gmail.com> wrote:
> Latest there is 1.3.2 (updated 09-Nov-2012; how can that be; 3 days ago?)

Actually, the release date is correct, 1.3.2 was at this time; I have
been on a coding frenzy since then ;)

Geraint (David)

unread,
Nov 14, 2012, 9:48:59 AM11/14/12
to json-...@googlegroups.com
Hey, congrats on the release.  :)

And coding frenzies are great fun.  Sadly, I now need a documentation-frenzy, which I find come much less naturally...

Geraint (David)

unread,
Dec 5, 2012, 4:48:47 AM12/5/12
to json-...@googlegroups.com, vra...@gmail.com
Guessing slightly here, but - it might be that Francis's tool doesn't support v3 references by default, even when validating v3 schemas.

I think this was driven by his (understandable) preference for v4-style references (JSON Pointer / JSON Reference).  There might be a setting somewhere...

On Wednesday, November 21, 2012 9:27:16 PM UTC, vra...@gmail.com wrote:
I was interested in the compatibility of some of the examples with JSV.

In JSV I attempted to place fstab.json as the Input and fstab-inline.json as the Schema. I received these errors:


    Problem with schema#/properties/%2F : Unknown schema reference
    Reported by http://json-schema.org/draft-03/schema#
    Attribute "{full}" ("schema#mntent")

    Problem with schema#/properties/swap : Unknown schema reference
    Reported by http://json-schema.org/draft-03/schema#
    Attribute "{full}" ("schema#mntent")

    Problem with schema#/patternProperties/%5E%2F%5B%5E%2F%5D%2B%28%2F%5B%5E%2F%5D%2B%29%2A%24 : Unknown schema reference
    Reported by http://json-schema.org/draft-03/schema#
    Attribute "{full}" ("schema#mntent")

    Problem with schema#/patternProperties/%5E%2F%5B%5E%2F%5D%2B%28%2F%5B%5E%2F%5D%2B%29%2A%24 : Unknown schema reference
    Reported by http://json-schema.org/draft-03/schema#
    Attribute "{full}" ("schema#mntent")


Thanks for all your work on this fge.

Francis Galiegue

unread,
Dec 5, 2012, 5:53:17 AM12/5/12
to json-...@googlegroups.com, vra...@gmail.com
On Wed, Dec 5, 2012 at 10:48 AM, Geraint (David) <gerai...@gmail.com> wrote:
> Guessing slightly here, but - it might be that Francis's tool doesn't
> support v3 references by default, even when validating v3 schemas.
>

Well yes I do, but here the tool is JSV, not json-schema-validator :)

The author of JSV is Gary Court.

Geraint (David)

unread,
Dec 5, 2012, 5:56:48 AM12/5/12
to json-...@googlegroups.com, vra...@gmail.com
Ah, OK!

Sorry - I thought he was taking the JSV examples and trying them with your code, not the other way around...
Reply all
Reply to author
Forward
0 new messages