Skip to content

Commit

Permalink
revert changes 74711cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshaybagai52 committed Mar 12, 2024
1 parent bc621d0 commit ae3b12f
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 125 deletions.
4 changes: 1 addition & 3 deletions components/StyledMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ const StyledMarkdownBlock = ({ markdown }: { markdown: string }) => {
},
table: {
component: ({ children }) => (
<div className='max-w-[100%] mx-auto mb-8 overflow-auto'>
<table className='table-auto'>{children}</table>
</div>
<table className='table-auto mb-8'>{children}</table>
),
},
thead: {
Expand Down
233 changes: 111 additions & 122 deletions pages/draft/2020-12/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,102 +33,96 @@ Here are some examples to illustrate the changes.

### Open tuple
<table>
<tbody>
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
</tr>
<tr>
<td>
```json
{
"items": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
]
}
```
</td>
<td>
```json
{
"prefixItems": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
]
}
```
</td>
</tr>
</tbody>
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
</tr>
<tr>
<td>
```json
{
"items": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
]
}
```
</td>
<td>
```json
{
"prefixItems": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
]
}
```
</td>
</tr>
</table>

### Closed tuple
<table>
<tbody>
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
</tr>
<tr>
<td>
```json
{
"items": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
],
"additionalItems": false
}
```
</td>
<td>
```json
{
"prefixItems": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
],
"items": false
}
```
</td>
</tr>
</tbody>
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
</tr>
<tr>
<td>
```json
{
"items": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
],
"additionalItems": false
}
```
</td>
<td>
```json
{
"prefixItems": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
],
"items": false
}
```
</td>
</tr>
</table>

### Tuple with constrained additional items
<table>
<tbody>
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
</tr>
<tr>
<td>
```json
{
"items": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
],
"additionalItems": { "$ref": "#/$defs/baz" }
}
```
</td>
<td>
```json
{
"prefixItems": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
],
"items": { "$ref": "#/$defs/baz" }
}
```
</td>
</tr>
</tbody>
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
</tr>
<tr>
<td>
```json
{
"items": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
],
"additionalItems": { "$ref": "#/$defs/baz" }
}
```
</td>
<td>
```json
{
"prefixItems": [
{ "$ref": "#/$defs/foo" },
{ "$ref": "#/$defs/bar" }
],
"items": { "$ref": "#/$defs/baz" }
}
```
</td>
</tr>
</table>

## $dynamicRef and $dynamicAnchor
Expand All @@ -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`.

<table>
<tbody>
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
Expand Down Expand Up @@ -216,7 +209,6 @@ Here's how you would covert a schema using `$recursiveRef` to use `$dynamicRef`.
```
</td>
</tr>
</tbody>
</table>


Expand All @@ -232,37 +224,35 @@ that has some item matching one schema and everything else matching another
schema.

<table>
<tbody>
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
</tr>
<tr>
<td>
```json
{
"type": "array",
"contains": { "type": "string" },
"items": {
"anyOf": [
{ "type": "string" },
{ "type": "number" }
]
}
}
```
</td>
<td>
```json
{
"type": "array",
"contains": { "type": "string" },
"unevaluatedItems": { "type": "number" }
<tr>
<th>Draft 2019-09</th>
<th>Draft 2020-12</th>
</tr>
<tr>
<td>
```json
{
"type": "array",
"contains": { "type": "string" },
"items": {
"anyOf": [
{ "type": "string" },
{ "type": "number" }
]
}
```
</td>
</tr>
</tbody>
}
```
</td>
<td>
```json
{
"type": "array",
"contains": { "type": "string" },
"unevaluatedItems": { "type": "number" }
}
```
</td>
</tr>
</table>

Unfortunately, this change means you may not be able to use `contains` in some
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ae3b12f

Please sign in to comment.