diff --git a/pages/draft-06/[slug].page.tsx b/pages/draft-06/[slug].page.tsx
new file mode 100644
index 000000000..fc447db63
--- /dev/null
+++ b/pages/draft-06/[slug].page.tsx
@@ -0,0 +1,39 @@
+import React from 'react';
+import Head from 'next/head';
+import { getLayout } from '~/components/Sidebar';
+import StyledMarkdown from '~/components/StyledMarkdown';
+import getStaticMarkdownPaths from '~/lib/getStaticMarkdownPaths';
+import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps';
+import { Headline1 } from '~/components/Headlines';
+import { SectionContext } from '~/context';
+import { DocsHelp } from '~/components/DocsHelp';
+
+export async function getStaticPaths() {
+ return getStaticMarkdownPaths('pages/draft-06');
+}
+export async function getStaticProps(args: any) {
+ return getStaticMarkdownProps(args, 'pages/draft-06');
+}
+
+export default function StaticMarkdownPage({
+ frontmatter,
+ content,
+}: {
+ frontmatter: any;
+ content: any;
+}) {
+ const markdownFile = '_index';
+ const newTitle = 'JSON Schema - ' + frontmatter.title;
+
+ return (
+
+
+ {newTitle}
+
+ {frontmatter.title}
+
+
+
+ );
+}
+StaticMarkdownPage.getLayout = getLayout;
diff --git a/pages/draft-06/index.md b/pages/draft-06/index.md
index 7532b5637..117c1974a 100644
--- a/pages/draft-06/index.md
+++ b/pages/draft-06/index.md
@@ -13,3 +13,8 @@ Specification: 'https://json-schema.org/draft-06/draft-wright-json-schema-01.htm
- Hyper-Schema: [draft-wright-json-schema-hyperschema-01](https://json-schema.org/draft-06/draft-wright-json-schema-hyperschema-01.html) ([changes](https://json-schema.org/draft-06/draft-wright-json-schema-hyperschema-01.html#rfc.appendix.B)) ([hyper-schema migration FAQ](https://json-schema.org/draft-06/json-hyper-schema-release-notes))
- [JSON Schema meta-schema](https://json-schema.org/draft-06/schema)
- [JSON Hyper-Schema meta-schema](https://json-schema.org/draft-06/hyper-schema)
+
+### Release Notes
+
+- [JSON Schema Release Notes](../draft-06/json-schema-release-notes)
+- [JSON Hyper-Schema Release Notes](../draft-06/json-hyper-schema-release-notes)
diff --git a/pages/draft-06/index.page.tsx b/pages/draft-06/index.page.tsx
index 4e63230f1..12127285b 100644
--- a/pages/draft-06/index.page.tsx
+++ b/pages/draft-06/index.page.tsx
@@ -10,29 +10,14 @@ import { DocsHelp } from '~/components/DocsHelp';
export async function getStaticProps() {
const index = fs.readFileSync('pages/draft-06/index.md', 'utf-8');
- const main = fs.readFileSync(
- 'pages/draft-06/json-schema-release-notes.md',
- 'utf-8',
- );
- const hyperSchema = fs.readFileSync(
- 'pages/draft-06/json-hyper-schema-release-notes.md',
- 'utf-8',
- );
- const readme = fs.readFileSync('pages/draft-06/readme.md', 'utf-8');
const { content: indexContent, data: indexData } = matter(index);
- const { content: bodyContent } = matter(main);
- const { content: hyperSchemaContent } = matter(hyperSchema);
- const { content: readmeContent } = matter(readme);
const frontmatter = { ...indexData };
return {
props: {
blocks: {
index: indexContent,
- body: bodyContent,
- hyperSchema: hyperSchemaContent,
- readme: readmeContent,
},
frontmatter,
},
@@ -51,9 +36,6 @@ export default function ImplementationsPages({
{frontmatter.title}
-
-
-
);
diff --git a/pages/draft-06/json-hyper-schema-release-notes.md b/pages/draft-06/json-hyper-schema-release-notes.md
index 94ce73117..19735c3a3 100644
--- a/pages/draft-06/json-hyper-schema-release-notes.md
+++ b/pages/draft-06/json-hyper-schema-release-notes.md
@@ -1,102 +1,107 @@
-### JSON Hyper-Schema Draft-06 Release Notes
+---
+title: JSON Hyper-Schema Draft-06 Release Notes
+section: docs
+---
Release notes for migrating from draft-luff-json-hyper-schema-00 (draft-04) to draft-wright-json-schema-hyperschema-01 (draft-06).
NOTE: draft-07 has been released
-The [migration notes for draft-07](../draft-07/json-hyper-schema-release-notes) give a much more straightforward overview of migrating from draft-04 to draft-07 by skipping the complicated intermediate states of draft-05 and draft-06. This page has been retained for historical interest, but it is not recommened for those who only want to get going with the latest draft.
+The [migration notes for draft-07](../draft-07/json-hyper-schema-release-notes) give a much more straightforward overview of migrating from draft-04 to draft-07 by skipping the complicated intermediate states of draft-05 and draft-06. This page has been retained for historical interest, but it is not recommened for those who just want to get going with the latest draft.
-**For implementors:** We recommend only implementing draft-07, and not draft-06 or earlier.
+**For implementors:** We recommend just implementing draft-07, and not draft-06 or earlier.
-- [Q: What are the incompatible changes between draft-04 and draft-06?](#q:-what-are-the-incompatible-changes-between-draft-04-and-draft-06)
- - [Changes from draft-04 to draft-05](#changes-from-draft-04-to-draft-05)
- - [Changes from draft-05 to draft-06](#changes-from-draft-05-to-draft-06)
- - [Proper use of "targetSchema"](#proper-use-of)
-- [Q: Why were several major changes made to Hyper-Schema before draft-06’s publication?](#q:-why-were-several-major-changes-made-to-hyper-schema-just-before-draft-06's-publication)
-- [Q: Why doesn’t the spec mention or behave like HTML anymore?](#q:-why-doesn't-the-spec-mention-or-behave-like-html-anymore)
- - [Splitting "schema"](#splitting)
- - [Removing "method"](#removing)
-- [Q: So how do I indicate which HTTP methods are supported on a link?](#q:-so-how-do-i-indicate-which-http-methods-are-supported-on-a-link)
-- [Q: No, really. How do I explicitly indicate which HTTP methods are supported on a link?](#q:-no-really.-how-do-i-indicate-which-http-methods-are-supported-on-a-link)
-- [Q: If "targetSchema" is not the response, how do I describe responses?](#q:-if-is-not-the-response-how-do-i-describe-responses)
+* [Q: What are the incompatible changes between draft-04 and draft-06?](#q:-what-are-the-incompatible-changes-between-draft-04-and-draft-06)
+ * [Changes from draft-04 to draft-05](#changes-from-draft-04-to-draft-05)
+ * [Changes from draft-05 to draft-06](#changes-from-draft-05-to-draft-06)
+ * [Proper use of "targetSchema"](#proper-use-of)
+* [Q: Why were several major changes made to Hyper-Schema just before draft-06’s publication?](#q:-why-were-several-major-changes-made-to-hyper-schema-just-before-draft-06's-publication)
+* [Q: Why doesn’t the spec mention or behave like HTML anymore?](#q:-why-doesn't-the-spec-mention-or-behave-like-html-anymore)
+ * [Splitting "schema"](#splitting)
+ * [Removing "method"](#removing)
+* [Q: So how do I indicate which HTTP methods are supported on a link?](#q:-so-how-do-i-indicate-which-http-methods-are-supported-on-a-link)
+* [Q: No, really. How do I explicitly indicate which HTTP methods are supported on a link?](#q:-no-really.-how-do-i-indicate-which-http-methods-are-supported-on-a-link)
+* [Q: If "targetSchema" is not the response, how do I describe responses?](#q:-if-is-not-the-response-how-do-i-describe-responses)
-#### Q: What are the incompatible changes between draft-04 and draft-06?
+### Q: What are the incompatible changes between draft-04 and draft-06?
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.
-While we knew that there were still major gaps in draft-06, we felt that it was a good set of changes for collecting feedback. With draft-07 published, that draft or later should be used, and draft-06 becomes an historical curiosity.
+While we knew that there were still major gaps in draft-06, we felt that it was a good set of changes for collecting feedback. With draft-07 published, that draft or later should be used, and draft-06 becomes an historical curiosity.
-##### Changes from draft-04 to draft-05
+#### Changes from draft-04 to draft-05
-| keyword | change | consequence |
-| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
-| `"base"` | replaces looking up the nearest "self" link to determine the base URI for `"href"` | if you were relying on "self" links to change the base, set `"base"` explicitly |
-| `"rel"` | "full" relation removed | use ["item"](https://github.com/json-schema-org/json-schema-spec/issues/295) |
-| `"rel"` | "instances" and "create" relations removed | use ["collection"](https://github.com/json-schema-org/json-schema-spec/issues/295) |
-| `"rel"` | "root" relation removed | use a fragment in your `"href"` URI Template |
-| `"fragmentResolution"` | _removed_ | media type determines how fragments are interpreted |
-| `"pathStart"` | _removed_ | _[no replacement]_ |
-| `"method"` | [changed back to HTML form semantics](../draft-03/draft-zyp-json-schema-03.pdf) of "get" and "post" rather than all HTTP methods | _[changed again in draft-06 due to feedback that this was confusing]_ |
+keyword | change | consequence
+---- | ---- | ----
+`"base"` | replaces looking up the nearest "self" link to determine the base URI for `"href"` | if you were relying on "self" links to change the base, set `"base"` explicitly
+`"rel"` | "full" relation removed | use ["item"](https://github.com/json-schema-org/json-schema-spec/issues/295)
+`"rel"` | "instances" and "create" relations removed | use ["collection"](https://github.com/json-schema-org/json-schema-spec/issues/295)
+`"rel"` | "root" relation removed | use a fragment in your `"href"` URI Template
+`"fragmentResolution"` | *removed* | media type determines how fragments are interpreted
+`"pathStart"` | *removed* | *[no replacement]*
+`"method"` | [changed back to HTML form semantics](../draft-03/draft-zyp-json-schema-03.pdf) of "get" and "post" rather than all HTTP methods | *[changed again in draft-06 due to feedback that this was confusing]*
-##### Changes from draft-05 to draft-06
+#### Changes from draft-05 to draft-06
-| keyword | change | consequence |
-| --------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `"method"` | _removed_ | for HTTP method proposals, see issues [#73](https://github.com/json-schema-org/json-schema-spec/issues/73) and [#296](https://github.com/json-schema-org/json-schema-spec/issues/296) (use either `"method"` or `"allow"` as an extension keyword if needed); indication of how to use `"schema"` and `"encType"` no longer necessary |
-| `"schema"` | _removed_ | use `"hrefSchema"`, `"submissionSchema"`, or `"targetSchema"` |
-| `"encType"` | _removed_ | use `"submissionEncType"` for request bodies; no longer needed for URI query strings |
-| `"hrefSchema"` | _added_ | replaces `"method": "get", "schema": {...}`, with additional functionality |
-| `"submissionSchema"` | _added_ | replaces `"method": "post", "schema": {...}` |
-| `"submissionEncType"` | _added_ | replaces `"method": "post", "encType": "..."` |
-| `"href"` | preprocessing removed | _to be replaced and expanded in future drafts_ |
+keyword | change | consequence
+---- | ---- | ----
+`"method"` | *removed* | for HTTP method proposals, see issues [#73](https://github.com/json-schema-org/json-schema-spec/issues/73) and [#296](https://github.com/json-schema-org/json-schema-spec/issues/296) (use either `"method"` or `"allow"` as an extension keyword if needed); indication of how to use `"schema"` and `"encType"` no longer necessary
+`"schema"` | *removed* | use `"hrefSchema"`, `"submissionSchema"`, or `"targetSchema"` |
+`"encType"` | *removed* | use `"submissionEncType"` for request bodies; no longer needed for URI query strings
+`"hrefSchema"` | *added* | replaces `"method": "get", "schema": {...}`, with additional functionality |
+`"submissionSchema"` | *added* | replaces `"method": "post", "schema": {...}`
+`"submissionEncType"` | *added* | replaces `"method": "post", "encType": "..."`
+`"href"` | preprocessing removed | *to be replaced and expanded in future drafts*
-##### Proper use of `"targetSchema"`
+#### Proper use of `"targetSchema"`
-Although 'targetSchema' has kept its meaning, its interpretation has varied. Therefore, using it as intended might feel like a modification
+While `"targetSchema"` did not change its meaning in either recent draft, it has been widely misinterpreted. So it may feel like a change to use it as specified.
-Due to draft-04 emphasizing individual HTTP methods as `"method"` values, many users interpreted `"targetSchema"` as a hint of the response to the method in `"method"`. This was never correct; all drafts define this keyword as describing the representation of the target resource, which appears as a response to HTTP GET, but may or may not appear in other responses.
+Due to draft-04 emphasizing individual HTTP methods as `"method"` values, many users interpreted `"targetSchema"` as a hint of the response to the method in `"method"`. This was never correct; all drafts define this keyword as describing the representation of the target resource, which appears as a response to HTTP GET, but may or may not appear in other responses.
-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.
+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, 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.
+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: Why were several major changes made to Hyper-Schema just before draft-06's publication?
+### Q: Why were several major changes made to Hyper-Schema just before draft-06's publication?
-A: During final review, it became apparent that there was no consensus on how to use the spec as written. The late changes were necessary to publish a spec with unambiguous meaning, so that we could get feedback on its contents rather than differing interpretations. Originally we attempted to simply clarify what was there, but then we realized there was no agreement on what was there in the first place.
+A: During final review, it became apparent that there was no consensus on how to use the spec as written. The late changes were necessary to publish a spec with unambiguous meaning, so that we could get feedback on its contents rather than differing interpretations. Originally we attempted to simply clarify what was there, but then we realized there was no agreement on what was there in the first place.
-#### Q: Why doesn't the spec mention or behave like HTML anymore?
+### Q: Why doesn't the spec mention or behave like HTML anymore?
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 `