From ae3b12f8923fe8e754552f09d66858d13585d859 Mon Sep 17 00:00:00 2001 From: Akshay Bagai <100753870+Akshaybagai52@users.noreply.github.com> Date: Tue, 12 Mar 2024 23:42:57 +0530 Subject: [PATCH] revert changes 74711cd --- components/StyledMarkdown.tsx | 4 +- pages/draft/2020-12/release-notes.md | 233 +++++++++++++-------------- 2 files changed, 112 insertions(+), 125 deletions(-) diff --git a/components/StyledMarkdown.tsx b/components/StyledMarkdown.tsx index 6bed564b32..8dc83f573d 100644 --- a/components/StyledMarkdown.tsx +++ b/components/StyledMarkdown.tsx @@ -234,9 +234,7 @@ const StyledMarkdownBlock = ({ markdown }: { markdown: string }) => { }, table: { component: ({ children }) => ( -
- {children}
-
+ {children}
), }, thead: { diff --git a/pages/draft/2020-12/release-notes.md b/pages/draft/2020-12/release-notes.md index cd04ba966d..5c2a783c17 100644 --- a/pages/draft/2020-12/release-notes.md +++ b/pages/draft/2020-12/release-notes.md @@ -33,102 +33,96 @@ Here are some examples to illustrate the changes. ### Open tuple - - - - - - - - - - + + + + + + + +
Draft 2019-09Draft 2020-12
- ```json - { - "items": [ - { "$ref": "#/$defs/foo" }, - { "$ref": "#/$defs/bar" } - ] - } - ``` - - ```json - { - "prefixItems": [ - { "$ref": "#/$defs/foo" }, - { "$ref": "#/$defs/bar" } - ] - } - ``` -
Draft 2019-09Draft 2020-12
+ ```json + { + "items": [ + { "$ref": "#/$defs/foo" }, + { "$ref": "#/$defs/bar" } + ] + } + ``` + + ```json + { + "prefixItems": [ + { "$ref": "#/$defs/foo" }, + { "$ref": "#/$defs/bar" } + ] + } + ``` +
### Closed tuple - - - - - - - - - - + + + + + + + +
Draft 2019-09Draft 2020-12
- ```json - { - "items": [ - { "$ref": "#/$defs/foo" }, - { "$ref": "#/$defs/bar" } - ], - "additionalItems": false - } - ``` - - ```json - { - "prefixItems": [ - { "$ref": "#/$defs/foo" }, - { "$ref": "#/$defs/bar" } - ], - "items": false - } - ``` -
Draft 2019-09Draft 2020-12
+ ```json + { + "items": [ + { "$ref": "#/$defs/foo" }, + { "$ref": "#/$defs/bar" } + ], + "additionalItems": false + } + ``` + + ```json + { + "prefixItems": [ + { "$ref": "#/$defs/foo" }, + { "$ref": "#/$defs/bar" } + ], + "items": false + } + ``` +
### Tuple with constrained additional items - - - - - - - - - - + + + + + + + +
Draft 2019-09Draft 2020-12
- ```json - { - "items": [ - { "$ref": "#/$defs/foo" }, - { "$ref": "#/$defs/bar" } - ], - "additionalItems": { "$ref": "#/$defs/baz" } - } - ``` - - ```json - { - "prefixItems": [ - { "$ref": "#/$defs/foo" }, - { "$ref": "#/$defs/bar" } - ], - "items": { "$ref": "#/$defs/baz" } - } - ``` -
Draft 2019-09Draft 2020-12
+ ```json + { + "items": [ + { "$ref": "#/$defs/foo" }, + { "$ref": "#/$defs/bar" } + ], + "additionalItems": { "$ref": "#/$defs/baz" } + } + ``` + + ```json + { + "prefixItems": [ + { "$ref": "#/$defs/foo" }, + { "$ref": "#/$defs/bar" } + ], + "items": { "$ref": "#/$defs/baz" } + } + ``` +
## $dynamicRef and $dynamicAnchor @@ -155,7 +149,6 @@ used as the starting point for dynamic resolution. Here's how you would covert a schema using `$recursiveRef` to use `$dynamicRef`. - @@ -216,7 +209,6 @@ Here's how you would covert a schema using `$recursiveRef` to use `$dynamicRef`. ``` -
Draft 2019-09 Draft 2020-12
@@ -232,37 +224,35 @@ that has some item matching one schema and everything else matching another schema. - - - - - - - - + + + + + - - + } + ``` + + +
Draft 2019-09Draft 2020-12
- ```json - { - "type": "array", - "contains": { "type": "string" }, - "items": { - "anyOf": [ - { "type": "string" }, - { "type": "number" } - ] - } - } - ``` - - ```json - { - "type": "array", - "contains": { "type": "string" }, - "unevaluatedItems": { "type": "number" } +
Draft 2019-09Draft 2020-12
+ ```json + { + "type": "array", + "contains": { "type": "string" }, + "items": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] } - ``` -
+ ```json + { + "type": "array", + "contains": { "type": "string" }, + "unevaluatedItems": { "type": "number" } + } + ``` +
Unfortunately, this change means you may not be able to use `contains` in some @@ -473,8 +463,7 @@ embedded schemas using `$defs`. Here's what the bundled schema would look like. Here are a few things you might notice from this example. 1. No `$ref`s were modified. Even local references are unchanged. -2. `https://example.com/schema/common#/` -`$defs/unsignedInt` got pulled in with the +2. `https://example.com/schema/common#/$defs/unsignedInt` got pulled in with the common schema even though it isn't used. It's allowed to trim out the extra definitions, but not necessary. 3. `https://example.com/schema/address` doesn't declare a `$schema`. Because it