-
-
Notifications
You must be signed in to change notification settings - Fork 215
Conversation
To make the changes easier to track in the version control history, these are the unmodified Draft 04 meta-schemas.
@Relequestual I just updated the last three commits because I had left off the hyper-schema meta-schema's "links" field. Otherwise it is unchanged (except deleting spaces from an otherwise blank line). |
Hopefully fixes #51 |
We haven't actually anointed a draft-05 meta-schema yet, so where is this getting pulled from? |
@awwright I spoke to @handrews on irc about a meta-schema. He said he had already done it, and it was ready, and you shot it down previously, saying we didn't need one for draft-5. I maintain we do for the website. Regardless, your review of this is welcome. I'll be reviewing it based on the changelog for draft-5. It IS a Pull Request, for review. (An example of why PRs are better than just commiting to master ;) ) |
I don't even know what this means. Writing the meta-schema isn't hard and doesn't take mystical cleric powers or anything. I just made the meta-schema changes required by the spec changes. |
@Relequestual based on IRC discussion with @awwright I need to make some adjustments to this. |
* Make the spacing / line use the same * Put $schema before the id * Use title for the short description of the whole meta-schema * Use "allOf" to combine "$ref" with "description" * Restore missing "format" and "readOnly" from Draft 04 This makes the meta-schemas correct for Draft 04 and consistently formatted (with the exception of placement of "definitions" which will be done separtely to keep the diffs clear). No Draft 05 changes have been applied at this point.
This makes the placement of "definitions" consistent across the meta-schemas.
This uses "uriref" where appropriate and makes the various change to hyper-schema and links required by the changes to the hyper-schema spec.
OK, I think I have updated this to address @awwright 's concerns. I also only left the draft-05 files in the diff. The current copies in the top directory can be changed separately once these are accepted. This keeps the diff looking more manageable. |
To review this, do it in these pieces: Standardize formatting and fix bugs in Draft 04 Move "definitions" to be at the top in all meta-schemas (no other changes) Add Draft 05 changes, except for "$ref" Add "$ref" for subschemas only Add "self" link to hyperschema that should be MUCH easier than reviewing it as a giant add. |
@JanTvrdik noted on the PR in json-schema-spec that I probably have the negation for "$ref" wrong, let me sort that out and update the commit... |
This ensures that subschemas are either "normal" JSON Schema objects according to the declared vocabulary, or references. The separate definitions of jsonReference and notJsonReference ensure that objects with a "$ref" property that is not a URI reference fail validation. If we just negated the jsonReference defintion, then {"$ref": 4} would validate as a non-reference schema which is incorrect.
OK, this should be good to go. Finally. For reals. Unless something else comes up... |
The hyper-schema on master in json-schema-spec includes "self" and "full" links. This backports the "self" link, but not the "full" link as Draft 05 removed that proposed link relation from the draft. "full" will be removed separately from json-schema-spec master.
headdesk x 9000 |
@Relequestual @awwright I have updated the commits in the earlier #57 (comment) to link to the updated commits. |
Noted! I'll get to it ASAP. |
I THINK we agreed we would NOT release a draft-5 meta-schema. I'll close this issue now. Please re-open or comment if you dissagree @handrews. Effort appreciated all the same. |
@Relequestual Here is the meta-schema PR that we discussed this morning (for me) / last night (for you).
This collects a lot of cleanup and updates for draft-05's meta-schema in a series of commits for easier review.
The first commit just copies the draft-04 files with no changes.
The remaining commit (except for the last) make bugfixes and feature changes in several steps for easy-to-read diffs. I'm not 100% sure about removing the empty fragment on "$schema" and "id" and the corresponding references, but as best I can tell from reviewing RFC 3986, an absolute URI must not have a fragment, and and empty fragment cannot be normalized away. So I think this is correct.
The final commit copies the completed draft-05 meta-schemas to the top level directory and bumps the number in the documentation. The documentation reference the top level directory URIs for the meta-schemas rather than the numbered URIs, so I left them as-is.