Skip to content

Update the test schema: add test ID, add descriptions, refactor #346

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

Merged
merged 5 commits into from
Apr 27, 2020

Conversation

ssilverman
Copy link
Member

Closes #53

@ssilverman ssilverman requested a review from a team April 25, 2020 07:19
@karenetheridge
Copy link
Member

Is this adding more detail to the schema to define structure that was already there, or is this adding/changing structure?

This adds IDs for individual tests and for sets of tests.
@ssilverman
Copy link
Member Author

ssilverman commented Apr 25, 2020

@karenetheridge I updated this PR to use more than one commit so the progression is more clear. Basically, the only major change is that it adds "id" to "tests" and to "test". Also, there's some refactoring so that the schema is cleaner and easier to read. Otherwise, there's no other structural change. Let me know if you want me to squash back into a single commit.

Note that I also fixed an error where there was only one "id" and in the wrong spot.

This is for readability---the main schema description is now the first
thing we read, details follow.
@ssilverman
Copy link
Member Author

ssilverman commented Apr 25, 2020

When I first made this PR, I was going to change it to draft-2019-09 because it just seemed like the right thing to do (also #238 mentions it). But then I reasoned that since a draft-04-only schema validator implementor might still need the test schema in draft-04 form, and that newer implementors might have support for the older drafts (thinking that's a bad assumption, though). So then I left it at draft-04. Thoughts?

@karenetheridge
Copy link
Member

Thanks, the broken-out commits make it all clear!
I really like the idea of having unique ids on test groups and individual tests -- this will make it easier for wrapper scripts to allow running just a subset of tests reliably (presently they need to key off of the filename and test names, which can change over time).

@karenetheridge
Copy link
Member

Unless a later draft is needed for some piece of syntax (doubtful given that this structure is simple), I'd lean towards sticking to draft 4 for now, as it's the most likely to be implemented, and can let a user bootstrap into testing later spec versions. I do not feel strongly about it though (and I'm just the peanut gallery here anyway).

@ssilverman
Copy link
Member Author

Thanks for your thoughts. I'll wait for an "approve" and then commit it.

@Julian
Copy link
Member

Julian commented Apr 27, 2020

lgtm thanks -- let's just be careful with adding the IDs -- I'd like to do so incrementally so that we don't end up doing large (automated) changes to the whole suite at once, since I can't really review them easily. Would prefer we incrementally add IDs to new tests, and then in smaller PRs go back and add them to existing ones.

@Julian
Copy link
Member

Julian commented Apr 27, 2020

@karenetheridge your opinion very much counts!

@ssilverman ssilverman merged commit 0a0f0cd into json-schema-org:master Apr 27, 2020
@ssilverman ssilverman deleted the test-id branch April 27, 2020 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add id and fullDescription keys to tests
3 participants