diff --git a/documentation.md b/documentation.md index eb8401b5..e0df7a77 100644 --- a/documentation.md +++ b/documentation.md @@ -3,7 +3,9 @@ layout: page title: Specification --- -The latest Internet-Drafts at the IETF are the draft-wright-json-schema\*-01 documents, which correspond to the draft-06 meta-schemas. These were published on 2017-04-15. (Due to a change in authorship the I-D numbering was reset with the previous draft). Please see the [release notes](draft-06/README.md) for more information on this release and information on migrating from previous drafts. +The latest Internet-Drafts at the IETF are the draft-wright-json-schema\*-01 documents, which correspond to the draft-06 meta-schemas. These were published on 2017-04-15. (Due to a change in authorship the I-D numbering was reset with the previous draft). + +Please see the **[migration notes](draft-06/README.md)** for more information on this release and on migrating from draft-04. The specification is split into three parts, Core, Validation, and Hyper-Schema: @@ -24,9 +26,17 @@ The latest meta-schema is draft-06. | [Core/Validation meta-schema](http://json-schema.org/schema) | Used for schemas written for pure validation. | | [Hyper meta-schema](http://json-schema.org/hyper-schema) | Used for schemas written for validation and hyper-linking. | -**If you are accessing the above meta-schema links from a web browser, you will need to save the file then open it as a JSON file.** +_If you are accessing the above meta-schema links **from a web browser**, you will need to **save the file** then open it as a JSON document._ + +Migrating from draft-04 +------------- + +The release notes discuss the changes impacting users and implementors: -Other versions --------------- +- [JSON Schema Core and Validation](draft-06/json-schema-migration-faq.md) +- [JSON Hyper-Schema](draft-06/json-hyper-schema-migration-faq.md) + +Older drafts +------------ Please see [Specification Links](specification-links.md) for older drafts and the latest unreleased version of the specification. diff --git a/draft-06/json-hyper-schema-migration-faq.md b/draft-06/json-hyper-schema-migration-faq.md index 1753a104..29355cd2 100644 --- a/draft-06/json-hyper-schema-migration-faq.md +++ b/draft-06/json-hyper-schema-migration-faq.md @@ -12,7 +12,7 @@ FAQ for migrating from draft-luff-json-hyper-schema-00 (draft-04) to draft-wrigh Between drafts 04 and 06 we undertook a major re-examining of Hyper-Schema, which has never been as widely adopted as JSON Schema Validation. -You will notice that some things are still in flight and under discussion for draft-07. We feel that draft-06 is a good set of changes for collecting feedback, with the most notable compatibility gaps easily addressed as extension keywords in the meantime. +You will notice that some things are still in flight and under discussion for [draft-07](https://github.com/json-schema-org/json-schema-spec/milestone/5). We feel that draft-06 is a good set of changes for collecting feedback, with the most notable compatibility gaps easily addressed as extension keywords in the meantime. #### Changes from draft-04 to draft-05 @@ -46,31 +46,13 @@ Due to draft-04 emphasizing individual HTTP methods as `"method"` values, many u Draft-06 clarifies this usage and provides guidance on its use with different HTTP methods. This includes using `"targetSchema"` as a request description for PUT and PATCH. With draft-04, many users used `"schema"` to describe PUT and PATCH requests which is not needed. -However, see also [#296](https://github.com/json-schema-org/json-schema-spec/issues/296) for a proposal for hinting at "Accept-Patch", which is needed to properly use `"targetSchema"` with HTTP PATCH. +However, the [`"targetHints"` proposal](https://github.com/json-schema-org/json-schema-spec/issues/296) has been accepted into draft-07. Among other things, it enables hinting at "Accept-Patch", which is needed to properly use `"targetSchema"` with HTTP PATCH. There will be examples and detailed guidance in draft-07. ### Q: What are key issues under consideration for draft-07? -There are a number of relatively concrete proposals, although it is unlikely that all will be resolved in draft-07 +You can follow draft-07's progress under the [draft-07 (wright-\*-02) milestone](https://github.com/json-schema-org/json-schema-spec/milestone/5). Hyper-Schema has been the primary focus of draft-07, including a likely top-to-bottom rewrite for clarity. No features from draft-06 seem likely to be removed, but keyword names are being made more consistent, and significant features are being added. -* [#73](https://github.com/json-schema-org/json-schema-spec/issues/73) `"allow"` for HTTP method hints, proposed as its own keyword -* [#296](https://github.com/json-schema-org/json-schema-spec/issues/296) `"usageHints"` for general protocol usage hints, including HTTP "Allow" and "Accept-Patch" -* [#295](https://github.com/json-schema-org/json-schema-spec/issues/295) clarifying usage of "collection" and "item" in `application/schema+json` -* [#140](https://github.com/json-schema-org/json-schema-spec/issues/140) `"anchor"` and `"anchorPointer"` for adjusting the link's context URI -* [#74](https://github.com/json-schema-org/json-schema-spec/issues/74) `"deprecation"` property -* [#51](https://github.com/json-schema-org/json-schema-spec/issues/51) `"$data"`, particularly for use with `"const"` and/or `"default"` in `"hrefSchema"` and `"submissionSchema"` -* [#204](https://github.com/json-schema-org/json-schema-spec/issues/204) includes specific possible uses of `"default"` related to Hyper-Schema - -There are some important philosophical discussions about the scope and goals of Hyper-Schema, which hopefully will be resolved to help us make the right decisions for draft-07 and beyond: - -* [#294](https://github.com/json-schema-org/json-schema-spec/issues/294) how analogous Hyper-Schema should or shouldn't be to HTML, particularly in regard to forms vs anchor semantics -* [#288](https://github.com/json-schema-org/json-schema-spec/issues/288) whether link URI Templates must be resolvable without knowing whether input data will be used -* [#226](https://github.com/json-schema-org/json-schema-spec/issues/226) whether and how to handle APIs that do not strictly conform to HTTP semantics - - -Additionally, there are two further proposals for JSON Schema vocabularies which could impact or complement Hyper-Schema: - -* [Documentation](https://github.com/json-schema-org/json-schema-spec/issues/136), which could take over some static API description work -* [UI](https://github.com/json-schema-org/json-schema-spec/issues/67), which would deal with presentation issues for forms +Additionally, there are proposals for [additional JSON Schema vocabularies](https://github.com/json-schema-org/json-schema-vocabularies), which could impact or complement Hyper-Schema. ### Q: Why were several major changes made to Hyper-Schema just before publication? @@ -78,7 +60,7 @@ A: During final review, it became apparent that there was no consensus on how to ### Q: Why doesn't the spec mention or behave like HTML anymore? -A: While there are [unresolved questions around HTML analogies](https://github.com/json-schema-org/json-schema-spec/issues/294), we came to a consensus that the existing analogies caused more harm than good, for two reasons: +A: We came to a consensus that the existing analogies caused more harm than good, for two reasons: 1. The change between draft-03 and draft-04 to let `"method"` indicate any HTTP method instead of HTML's `