Giter VIP home page Giter VIP logo

Comments (7)

jdanyow avatar jdanyow commented on June 23, 2024 1

@ebdrup I think it would be good to use draft-7 as the default. It's ajv's default draft version and the most modern of the stable drafts.

The test results look correct to me- the failures here:
https://github.com/ebdrup/json-schema-benchmark/blob/master/draft7/reports/@cfworker/json-schema.md
Match the unsupported tests here:
https://github.com/cfworker/cfworker/blob/main/packages/json-schema/test/index.spec.ts#L7

from json-schema-benchmark.

ebdrup avatar ebdrup commented on June 23, 2024

@christian-weiss I think it's a really good idea. I don't have time to do much else than accepting PRs and updating the test results as new versions of the testsuite and validators are released. Help would be appreciated :-)

from json-schema-benchmark.

ChALkeR avatar ChALkeR commented on June 23, 2024

An easy way would be to host separate branches for each draft, e.g.:

  • draft-04
  • draft-06
  • draft-07
  • draft2019-09

And add a simple menu in the README to switch between those branches.

Default could be any of those (I would vote for anything newer than 04).

#48 implements draft-06 tests.

from json-schema-benchmark.

ebdrup avatar ebdrup commented on June 23, 2024

Menu in the readme, super great idea. I guess it's also misleading that the current readme doesn't show you that it's actually testing only draft-4

from json-schema-benchmark.

ebdrup avatar ebdrup commented on June 23, 2024

I have added draft 4 and 6, draft 6 is the default, now... I'm out of touch with the developments in the standard. Would it make sense to make draft2019-09 the default, or do too few validators support that?

from json-schema-benchmark.

daniela-waranie avatar daniela-waranie commented on June 23, 2024

As drafts are drafts, i would not call them "standard".
As far as i know draft-3, draft-4, draft-6 and draft-7 are somehow "stable", so i do not expect big changes here.
So i vote for making "draft-7" the default.

from json-schema-benchmark.

ebdrup avatar ebdrup commented on June 23, 2024

@daniela-waranie I have added tests for draft-7: https://github.com/ebdrup/json-schema-benchmark/tree/master/draft7
But I chose to not make it the default as all validators fail a LOT of the tests - I'm not sure if I'm doing something wrong or validators are really so bad at draft-7? I think it's probably me doing something wrong, so I can't make it the default right now.

from json-schema-benchmark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.