Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft 04 features #7

Closed
IreneKnapp opened this issue Nov 15, 2012 · 8 comments
Closed

Draft 04 features #7

IreneKnapp opened this issue Nov 15, 2012 · 8 comments
Labels
missing test A request to add a test to the suite that is currently not covered elsewhere.

Comments

@IreneKnapp
Copy link
Contributor

I realize that draft 04 isn't finalized yet, but it makes some substantial changes and those of us trying to be ahead of the curve could definitely use tests for them. I'm intending to do a lot of this work myself, in fact, I just wanted to create an issue for it to let people know and provide a centralized place to coordinate.

Is anyone aware of an actual list of the changes that have gone into 04 already? Or is the best approach to read both and compare? It would be unfortunate if so, ... I'll ask this in the google group also.

@Julian
Copy link
Member

Julian commented Nov 15, 2012

There is some work being done in the various repositories for each validator implementation. My own issue is here: python-jsonschema/jsonschema#28. I haven't really personally started doing anything on it yet but a number of contributors have expressed interest, and being that I use this suite doing so is definitely going to mean starting on writing draft 4 tests for this suite, so as that happens of course this will be updated. No timeframe of course on that yet.

I don't know of a concise list of differences yet. I'm expecting to need to do essentially what I did the first time, just read the draft carefully.

I'd definitely love it if work on this was started (and the first thing to do would be to start copying over tests that are equivalent among the two versions probably).

@Julian
Copy link
Member

Julian commented Nov 15, 2012

Oh and by the way – while draft 3 is mostly complete, it's not totally complete yet. Major things like $ref and extends tests haven't yet been ported to JSON so that still needs to be done too :P.

@IreneKnapp
Copy link
Contributor Author

Okay - thanks for the information and blessing! I've made a start of porting the test cases that are still in Python to JSON. Right now I'm about a third of the way through your tests.py.

In some cases the tests I've ported overlap with existing tests, but I've ported them anyway, because they aren't identical and more is probably good.

In most cases, the names are quite terse or confusing, but I've kept those intact because I don't view it as my place (or my responsibility :) ) to make them clear and concise; I'll let you do that in a cleanup pass later if you want to.

I'll note that I'm able to go much faster by pretending to myself that this is a simple mechanical process with no room for judgement calls, which is the real motivator behind those two decisions.

Anyway, just keeping you informed!

@gazpachoking
Copy link
Contributor

So, I'm working on a branch with draft 4 tests, so far I have all of the current tests ported over to draft 4 style. I have yet to add any of the new tests which did not have a similar thing in draft 3 ("anyOf", "oneOf", "definitions", "minProperties", "maxProperties".) I'll make a pull request once I add those in.

https://github.com/gazpachoking/JSON-Schema-Test-Suite/tree/draft4

@fge
Copy link
Contributor

fge commented Feb 6, 2013

Note: feel free to pick from my implementation. It is currently undergoing a complete rewrite, but it has v4 tests that you can shamelessly copy -- I don't care, and more than that I'd be happy if you did ;)

On a more general note, as I said in another issue, it should be made clear that regexes in JSON Schema are not anchored; existing samples don't make this clear enough to my tastes. Well, OK, the spec says it since I ensure that it did, heh.

@gazpachoking
Copy link
Contributor

Okay, put a pull request (#26) in with the new draft 4 tests added as well. Happy to make any changes anyone thinks are needed.

@fge I had a little trouble deciphering your repo structure, I imagine there is still some good stuff in there to be grabbed.

@fge
Copy link
Contributor

fge commented Feb 6, 2013

@gazpachoking What you may be interested in currently lies in src/test/resources/old

I am undergoing a complete redesign of the API, and old test files (which I salvage from) are located there at this moment. Do not hesitate to contact me if you have any problems!

@Julian
Copy link
Member

Julian commented Feb 15, 2013

Merged in #26.

@Julian Julian closed this as completed Feb 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing test A request to add a test to the suite that is currently not covered elsewhere.
Projects
None yet
Development

No branches or pull requests

4 participants