Skip to content

Commit d7d3ffd

Browse files
committed
Revert release notes changes
Revert the old release notes pages
1 parent e4f6e8b commit d7d3ffd

24 files changed

+569
-433
lines changed

pages/draft-06/[slug].page.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from 'react';
2+
import Head from 'next/head';
3+
import { getLayout } from '~/components/Sidebar';
4+
import StyledMarkdown from '~/components/StyledMarkdown';
5+
import getStaticMarkdownPaths from '~/lib/getStaticMarkdownPaths';
6+
import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps';
7+
import { Headline1 } from '~/components/Headlines';
8+
import { SectionContext } from '~/context';
9+
import { DocsHelp } from '~/components/DocsHelp';
10+
11+
export async function getStaticPaths() {
12+
return getStaticMarkdownPaths('pages/draft-06');
13+
}
14+
export async function getStaticProps(args: any) {
15+
return getStaticMarkdownProps(args, 'pages/draft-06');
16+
}
17+
18+
export default function StaticMarkdownPage({
19+
frontmatter,
20+
content,
21+
}: {
22+
frontmatter: any;
23+
content: any;
24+
}) {
25+
const markdownFile = '_index';
26+
const newTitle = 'JSON Schema - ' + frontmatter.title;
27+
28+
return (
29+
<SectionContext.Provider value={frontmatter.section || null}>
30+
<Head>
31+
<title>{newTitle}</title>
32+
</Head>
33+
<Headline1>{frontmatter.title}</Headline1>
34+
<StyledMarkdown markdown={content} />
35+
<DocsHelp markdownFile={markdownFile} />
36+
</SectionContext.Provider>
37+
);
38+
}
39+
StaticMarkdownPage.getLayout = getLayout;

pages/draft-06/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ Specification: 'https://json-schema.org/draft-06/draft-wright-json-schema-01.htm
1313
- 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))
1414
- [JSON Schema meta-schema](https://json-schema.org/draft-06/schema)
1515
- [JSON Hyper-Schema meta-schema](https://json-schema.org/draft-06/hyper-schema)
16+
17+
### Release Notes
18+
19+
- [JSON Schema Release Notes](../draft-06/json-schema-release-notes)
20+
- [JSON Hyper-Schema Release Notes](../draft-06/json-hyper-schema-release-notes)

pages/draft-06/index.page.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,14 @@ import { DocsHelp } from '~/components/DocsHelp';
1010

1111
export async function getStaticProps() {
1212
const index = fs.readFileSync('pages/draft-06/index.md', 'utf-8');
13-
const main = fs.readFileSync(
14-
'pages/draft-06/json-schema-release-notes.md',
15-
'utf-8',
16-
);
17-
const hyperSchema = fs.readFileSync(
18-
'pages/draft-06/json-hyper-schema-release-notes.md',
19-
'utf-8',
20-
);
21-
const readme = fs.readFileSync('pages/draft-06/readme.md', 'utf-8');
2213

2314
const { content: indexContent, data: indexData } = matter(index);
24-
const { content: bodyContent } = matter(main);
25-
const { content: hyperSchemaContent } = matter(hyperSchema);
26-
const { content: readmeContent } = matter(readme);
2715

2816
const frontmatter = { ...indexData };
2917
return {
3018
props: {
3119
blocks: {
3220
index: indexContent,
33-
body: bodyContent,
34-
hyperSchema: hyperSchemaContent,
35-
readme: readmeContent,
3621
},
3722
frontmatter,
3823
},
@@ -51,9 +36,6 @@ export default function ImplementationsPages({
5136
<Headline1>{frontmatter.title}</Headline1>
5237
<DocTable frontmatter={frontmatter} />
5338
<StyledMarkdown markdown={blocks.index} />
54-
<StyledMarkdown markdown={blocks.body} />
55-
<StyledMarkdown markdown={blocks.hyperSchema} />
56-
<StyledMarkdown markdown={blocks.readme} />
5739
<DocsHelp />
5840
</SectionContext.Provider>
5941
);

pages/draft-06/json-hyper-schema-release-notes.md

Lines changed: 60 additions & 55 deletions
Large diffs are not rendered by default.

pages/draft-06/json-schema-release-notes.md

Lines changed: 89 additions & 80 deletions
Large diffs are not rendered by default.

pages/draft-06/readme.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

pages/draft-07/[slug].page.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from 'react';
2+
import Head from 'next/head';
3+
import StyledMarkdown from '~/components/StyledMarkdown';
4+
import { getLayout } from '~/components/Sidebar';
5+
import getStaticMarkdownPaths from '~/lib/getStaticMarkdownPaths';
6+
import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps';
7+
import { Headline1 } from '~/components/Headlines';
8+
import { SectionContext } from '~/context';
9+
import { DocsHelp } from '~/components/DocsHelp';
10+
11+
export async function getStaticPaths() {
12+
return getStaticMarkdownPaths('pages/draft-07');
13+
}
14+
export async function getStaticProps(args: any) {
15+
return getStaticMarkdownProps(args, 'pages/draft-07');
16+
}
17+
18+
export default function StaticMarkdownPage({
19+
frontmatter,
20+
content,
21+
}: {
22+
frontmatter: any;
23+
content: any;
24+
}) {
25+
const markdownFile = '_index';
26+
const newTitle = 'JSON Schema - ' + frontmatter.title;
27+
28+
return (
29+
<SectionContext.Provider value={frontmatter.section || null}>
30+
<Head>
31+
<title>{newTitle}</title>
32+
</Head>
33+
<Headline1>{frontmatter.title}</Headline1>
34+
<StyledMarkdown markdown={content} />
35+
<DocsHelp markdownFile={markdownFile} />
36+
</SectionContext.Provider>
37+
);
38+
}
39+
StaticMarkdownPage.getLayout = getLayout;

pages/draft-07/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,11 @@ _These were updated without changing functionality or meta-schemas due to a few
3131
- Validation: [draft-handrews-json-schema-validation-00](https://json-schema.org/draft-07/draft-handrews-json-schema-validation-00.pdf) ([changes](https://json-schema.org/draft-07/draft-handrews-json-schema-validation-00.pdf#appendix-B))
3232
- Hyper-Schema: [draft-handrews-json-schema-hyperschema-00](https://json-schema.org/draft-07/draft-handrews-json-schema-hyperschema-00.html) ([changes](https://json-schema.org/draft-07/draft-handrews-json-schema-hyperschema-00.html#rfc.appendix.B))
3333
- Relative JSON Pointer: [draft-handrews-relative-json-pointer-00](https://tools.ietf.org/html/draft-handrews-relative-json-pointer-00) ([changes](https://tools.ietf.org/html/draft-handrews-relative-json-pointer-00#appendix-B))
34+
35+
### Release Notes
36+
37+
- [JSON Schema Release Notes](../draft-07/json-schema-release-notes)
38+
- [JSON Hyper-Schema Release Notes](../draft-07/json-hyper-schema-release-notes)
39+
40+
41+
Note that the draft-handrews-\*-00 versions of JSON Hyper-Schema and Relative JSON Pointer had confusing bugs, and have been replaced by draft-handrews-\*-01 versions. The -00 versions may be found in the [obsolete](obsolete) directory.

pages/draft-07/index.page.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,14 @@ import { DocsHelp } from '~/components/DocsHelp';
1010

1111
export async function getStaticProps() {
1212
const index = fs.readFileSync('pages/draft-07/index.md', 'utf-8');
13-
const main = fs.readFileSync(
14-
'pages/draft-07/json-schema-release-notes.md',
15-
'utf-8',
16-
);
17-
const hyperSchema = fs.readFileSync(
18-
'pages/draft-07/json-hyper-schema-release-notes.md',
19-
'utf-8',
20-
);
21-
const readme = fs.readFileSync('pages/draft-07/readme.md', 'utf-8');
2213

2314
const { content: indexContent, data: indexData } = matter(index);
24-
const { content: bodyContent } = matter(main);
25-
const { content: hyperSchemaContent } = matter(hyperSchema);
26-
const { content: readmeContent } = matter(readme);
2715

2816
const frontmatter = { ...indexData };
2917
return {
3018
props: {
3119
blocks: {
3220
index: indexContent,
33-
body: bodyContent,
34-
hyperSchema: hyperSchemaContent,
35-
readme: readmeContent,
3621
},
3722
frontmatter,
3823
},
@@ -51,9 +36,6 @@ export default function ImplementationsPages({
5136
<Headline1>{frontmatter.title}</Headline1>
5237
<DocTable frontmatter={frontmatter} />
5338
<StyledMarkdown markdown={blocks.index} />
54-
<StyledMarkdown markdown={blocks.body} />
55-
<StyledMarkdown markdown={blocks.hyperSchema} />
56-
<StyledMarkdown markdown={blocks.readme} />
5739
<DocsHelp />
5840
</SectionContext.Provider>
5941
);
Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
### JSON Hyper-Schema Draft-07 Release Notes
1+
---
2+
title: JSON Hyper-Schema Draft-07 Release Notes
3+
section: docs
4+
---
25

36
JSON Hyper-Schema [draft-07](../../draft-07/json-schema-hypermedia.html) completes the
47
reworking of Hyper-Schema that was begun in draft-06.
@@ -9,55 +12,56 @@ so keywords used for other purposes (`readOnly` and `media`) have been
912

1013
The [new draft](../../draft-07/json-schema-hypermedia.html) has been completely rewritten
1114
for clarity and accessibility, so it is best to simply approach it as a new
12-
proposal.
15+
proposal. We hope to add tutorial material at some point, but that is
16+
outside of the scope of release notes.
1317

1418
However, if you wish to migrate from an earlier draft, this page is a guide
15-
to the key changes. The additions, which are much more numerous,
19+
to the key _changes_. The additions, which are much more numerous,
1620
should be learned directly from the new specification until we can provide
1721
tutorials.
1822

1923
Note that draft-handrews-json-schema-hyperschema-00 has been replaced
2024
by draft-handrews-json-schema-hyperschema-01 in order to fix confusing
21-
bugs. The newer -01 draft is **still considered to be draft-07**.
25+
bugs. The newer -01 draft is **still considered to be draft-07**.
2226
It now references the draft-07 meta-schema with the correct URI, among
23-
other typo fixes. There are no funcitonal changes between -00 and -01.
27+
other typo fixes. There are no funcitonal changes between -00 and -01.
2428

25-
- [Migrating from draft-06](#migrating-from-draft-06)
26-
- [Migrating from draft-05](#migrating-from-draft-05)
27-
- [Migrating from draft-04](#migrating-from-draft-04)
28-
- [GET](#get)
29-
- [PUT](#put)
30-
- [DELETE](#delete)
31-
- [POST](#post)
32-
- [PATCH](#patch)
29+
* [Migrating from draft-06](#migrating-from-draft-06)
30+
* [Migrating from draft-05](#migrating-from-draft-05)
31+
* [Migrating from draft-04](#migrating-from-draft-04)
32+
* [GET](#get)
33+
* [PUT](#put)
34+
* [DELETE](#delete)
35+
* [POST](#post)
36+
* [PATCH](#patch)
3337

34-
#### Migrating from draft-06
38+
### Migrating from draft-06
3539

3640
No draft-06 features were changed, although two keywords were renamed
3741
for clarity and consistency:
3842

39-
- `mediaType` -> `targetMediaType`
40-
- `submissionEncType` -> `submissionMediaType`
43+
* `mediaType` -> `targetMediaType`
44+
* `submissionEncType` -> `submissionMediaType`
4145

4246
Additionally, `hrefSchema` was somewhat confusing, so a great deal
4347
more effort has gone into explaining how it works, and how it fits
4448
into the overall link resolution process.
4549

46-
#### Migrating from draft-05
50+
### Migrating from draft-05
4751

4852
See the [draft-06 release notes](../../draft-06/json-hyper-schema-release-notes)
4953
for information related to draft-05.
5054

51-
#### Migrating from draft-04
55+
### Migrating from draft-04
5256

5357
In the ideal draft-07 world, links and
5458
[operations](https://json-schema.org/draft-07/json-schema-hypermedia.html#rfc.section.3.1)
55-
are not the same concept. Using terminology borrowed from
59+
are not the same concept. Using terminology borrowed from
5660
[OpenAPI's Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#operationObject), HTTP methods are operations, and each
5761
link (as described by a single LDO) can support multiple operations.
5862

5963
Therefore, unlike draft-04, draft-07 hyper-schemas
60-
[do not have separate links for each operation](../../draft-07/json-schema-hypermedia.html#rfc.section.8.1). This makes the migration guidelines below approximate at best.
64+
[do not have separate links for each operation](../../draft-07/json-schema-hypermedia.html#rfc.section.8.1). This makes the migration guidelines below approximate at best.
6165

6266
For a more detailed explanation of how draft-04's `method` and `targetSchema`
6367
were typically used to create single-operation links, and how that poses
@@ -75,53 +79,53 @@ means that some uses of draft-04 do not have direct analogues in draft-07.
7579

7680
Any keyword not mentioned in a list below is unchanged for that link operation.
7781

78-
##### GET
82+
#### GET
7983

80-
- `"method": "GET"` -> `"targetHints": {"allow": ["GET"]}`
81-
- `mediaType` -> `targetMediaType`
82-
- `schema` -> `hrefSchema` with parameters added to `href`
83-
- `encType` -> drop if `application/x-www-form-urlencoded`, contact the mailing list otherwise
84+
* `"method": "GET"` -> `"targetHints": {"allow": ["GET"]}`
85+
* `mediaType` -> `targetMediaType`
86+
* `schema` -> `hrefSchema` with parameters added to `href`
87+
* `encType` -> drop if `application/x-www-form-urlencoded`, contact the mailing list otherwise
8488

85-
##### PUT
89+
#### PUT
8690

8791
If you have a PUT link where `schema`/`encType` differ from
8892
`targetSchema`/`mediaType`, where `targetSchema`/`mediaType`
8993
describe a non-representation response, then those fields do
9094
not have a direct replacement.
9195

92-
- `"method": "PUT"` -> `"targetHints": {"allow": ["PUT"]}`
93-
- `schema` -> `targetSchema`
94-
- `encType` -> `targetMediaType`
96+
* `"method": "PUT"` -> `"targetHints": {"allow": ["PUT"]}`
97+
* `schema` -> `targetSchema`
98+
* `encType` -> `targetMediaType`
9599

96-
##### DELETE
100+
#### DELETE
97101

98102
DELETE does not take a request payload, so `schema` and `encType`
99-
should be unused. If `targetSchema` and `mediaType` were being
103+
should be unused. If `targetSchema` and `mediaType` were being
100104
used for a response other than the just-deleted resource's representation,
101105
then they do not have a direct replacement.
102106

103-
- `"method": "DELETE"` -> `"targetHints": {"allow": ["DELETE"]}`
104-
- `mediaType` -> `targetMediaType` (if describing the representation)
107+
* `"method": "DELETE"` -> `"targetHints": {"allow": ["DELETE"]}`
108+
* `mediaType` -> `targetMediaType` (if describing the representation)
105109

106-
##### POST
110+
#### POST
107111

108112
In most cases, the response of a POST is **not** a representation of the
109113
target resource, but rather some sort of result or status of whatever
110-
the POST attempted to do. Therefore `targetSchema` and `mediaType`
111-
should almost certainly be dropped. Other than that:
114+
the POST attempted to do. Therefore `targetSchema` and `mediaType`
115+
should almost certainly be dropped. Other than that:
112116

113-
- `"method": "POST"` -> `"targetHints": {"allow": ["POST"]}`
114-
- `schema` -> `submissionSchema`
115-
- `encType` -> `submissionMediaType`
117+
* `"method": "POST"` -> `"targetHints": {"allow": ["POST"]}`
118+
* `schema` -> `submissionSchema`
119+
* `encType` -> `submissionMediaType`
116120

117-
##### PATCH
121+
#### PATCH
118122

119123
It was never entirely clear how to model a proper PATCH (that uses
120124
a patch media type rather than `application/json` in the request) in Hyper-Schema.
121125
One option was to treat it identically to PUT except with the patch media type
122-
in `encType`. Assuming that approach (and the same `taregetSchema`/`mediaType`
126+
in `encType`. Assuming that approach (and the same `taregetSchema`/`mediaType`
123127
caveats as for PUT):
124128

125-
- `"method": "PATCH"` -> `"targetHints": {"allow": ["PATCH"]}`
126-
- `schema` -> `targetSchema`
127-
- `"encType": "..."` -> `"targetHints": {"accept-patch": "..."}`
129+
* `"method": "PATCH"` -> `"targetHints": {"allow": ["PATCH"]}`
130+
* `schema` -> `targetSchema`
131+
* `"encType": "..."` -> `"targetHints": {"accept-patch": "..."}`

0 commit comments

Comments
 (0)