Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added migration page overview #1061

Draft
wants to merge 52 commits into
base: main
Choose a base branch
from
Draft
Changes from 28 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
859a6f1
Added migration page overview
kwennB Oct 24, 2024
93bcaba
Update pages/specification/migration/_index.md
kwennB Oct 25, 2024
d4c8b24
Update pages/specification/migration/_index.md
kwennB Oct 25, 2024
8eb9721
Updated migration overview
kwennB Oct 28, 2024
75ee2a1
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
a967f66
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
b22b2ff
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
c5d352e
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
136ee2e
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
fa6391b
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
83536f1
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
dd364ba
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
dd1d4e7
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
33b69ab
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
9c583ce
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
5a4b8b3
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
24488f9
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
4e5a08d
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
d17e308
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
c5b1f87
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
95276a0
Update pages/specification/migration/_index.md
kwennB Oct 29, 2024
288e5d9
Update pages/specification/migration/_index.md
kwennB Oct 30, 2024
7199292
Update pages/specification/migration/_index.md
kwennB Oct 30, 2024
8cc36f0
Update pages/specification/migration/_index.md
kwennB Oct 30, 2024
45aecbc
Update pages/specification/migration/_index.md
kwennB Oct 30, 2024
65ba898
Update pages/specification/migration/_index.md
kwennB Oct 30, 2024
9891c6e
Update pages/specification/migration/_index.md
kwennB Oct 30, 2024
5bdfc65
added updates to migration overview
kwennB Oct 30, 2024
3ef35de
Adding migration folders and cards
benjagm Nov 2, 2024
a68d4f3
updated overview
kwennB Nov 7, 2024
65325b8
renamed page and added metadata
benjagm Nov 8, 2024
419ea36
updated links to the rights migration docs
benjagm Nov 8, 2024
43f9816
Added Alterschema details and individual draft pages
kwennB Nov 8, 2024
bb62eaa
Added migration data to single page-Draft 3-4.
kwennB Nov 12, 2024
757f1f9
Updated the Draft 3-4
kwennB Nov 14, 2024
5eae100
Updated Draft 3-4
kwennB Nov 15, 2024
93da171
Update pages/specification/migration/_index.md
kwennB Nov 20, 2024
994f731
Update pages/draft-04/migration-notes.md
kwennB Nov 20, 2024
ffcf639
Update pages/draft-04/migration-notes.md
kwennB Nov 20, 2024
b439468
Update pages/draft-04/migration-notes.md
kwennB Nov 20, 2024
85b9ceb
Update pages/draft-04/migration-notes.md
kwennB Nov 20, 2024
81ebeea
Updated Draft 3-4 & Overview
kwennB Nov 24, 2024
d718e51
added draft 2-3
kwennB Nov 24, 2024
3a5a632
Update pages/draft-04/migration-notes.md
kwennB Dec 2, 2024
33e536b
Update pages/specification/migration/_index.md
kwennB Dec 2, 2024
266963b
Update pages/specification/migration/_index.md
kwennB Dec 2, 2024
e75e0da
Update pages/specification/migration/_index.md
kwennB Dec 2, 2024
78d912a
Update pages/specification/migration/_index.md
kwennB Dec 2, 2024
5a46c9d
Update pages/draft-03/migration-notes.md
kwennB Dec 2, 2024
91c3b63
Update pages/draft-03/migration-notes.md
kwennB Dec 2, 2024
ddec102
Update pages/draft-03/migration-notes.md
kwennB Dec 2, 2024
f0fd4c2
Updated draft 2-3
kwennB Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 81 additions & 1 deletion pages/specification/migration/_index.md
kwennB marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,85 @@ title: Migrating from older drafts
section: docs
---

The release notes discuss the changes impacting users and implementers:
### Introduction

Just as your schemas evolve over time, the JSON Schema specification does as well. This guide provides useful information to make upgrading your schemas across versions of the specification a breeze.
kwennB marked this conversation as resolved.
Show resolved Hide resolved

Learn how to use our migration guides and tooling ([AlterSchema](https://alterschema.sourcemeta.com/)) to bring your work with you.
kwennB marked this conversation as resolved.
Show resolved Hide resolved

### Keywords Overview

Here is a comprehensive overview to get you started.
kwennB marked this conversation as resolved.
Show resolved Hide resolved

| All Keywords | Specification | Draft introduction | Removed | Changed |
kwennB marked this conversation as resolved.
Show resolved Hide resolved
| --------------------------- | ------------- | ------------------ | ------- | -------------------------------------------------------------------------------------------- |
| `$anchor` | Core | 2019-09 | No | Partially replaced `$id` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should improve on the description of the change. Instead of just saying it partially replaces $id, we can mention something like the fact that $ids that defined anchor-only URI, like $id: #foo are now replaced with $anchor?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My assumption is that this needs to be very brief to not explode the table. I'm not sure we have the space to explain the change properly. My understanding was that this kind of thing was going to be covered in detail elsewhere.

| `$comment` | Core | 07 | No | |
| `$id` | Core | 06 | No | Replaced `id` |
| `$defs` | Core | 2019-09 | No | Replaced `definitions` |
| `$dynamicAnchor` | Core | 2020-12 | No | Replaced `$recursiveAnchor` |
| `$dynamicRef` | Core | 2020-12 | No | Replaced `$recursiveRef` |
Copy link

@suprith-hub suprith-hub Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jviotti @kwennB , I think because $dynamicRef, $dynamicAnchor added more flexibility / usage over $recursiveAnchor.
Maybe we can say it as replacement or enhancement ? OR something like that

| `$recursiveAnchor` | Core | 2019-09 | 2020-12 | Replaced by `$dynamicAnchor` |
| `$recursiveRef` | Core | 2019-09 | 2020-12 | Replaced by `$dynamicRef` |
| `$ref` (legacy) | Core | 03 | 2019-09 | Replaced by `$ref` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entry feels weird. We are saying that $ref was removed on 2019-09 and replaced by $ref, which feels very confusing. The change this specific entry should be documenting is that before 2019-09, $ref took precedence over any other sibling keyword. In other words, before 2019-09, if you put any other keywords alongside $ref, it would be ignored.

| `$ref` | Core | 2019-09 | No | Replaced `$ref` (legacy) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a description here? I feel we would be just repeating the description of the entry above?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If describing the change in more detail is an option, we wouldn't need two entries.

| `$schema` | Core | 03 | No | No |
| `$vocabulary` | Core | 2019-09 | No | No |
| `additionalItems` | Core | 03 | 2020-12 | Replaced by `items` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 2019-09, this keyword was modified to produce annotations

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to note that things started producing annotations in 2019-09. Nothing produced annotations before 2019-09. I think it's given or at least can be generally stated once at the top of the table that annotations only became a thing in 2019-09.

| `allOf` | Core | 04 | No | No |
| `anyOf` | Core | 04 | No | No |
| `const` | Validation | 06 | No | No |
| `contains` | Core | 06 | No | No |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contains keyword was slightly changed in 2020-12. In 2020-12, it now emits annotations and affects unevaluatedItems

| `contentEncoding` (legacy) | Core | 01 | 04 | Replaced by `media`.`binaryEncoding` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these contentEncoding entries make sense. contentEncoding as a keyword remains even up to 2020-12

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jviotti, see #1061 (comment). This keyword has a really complicated history. It does exist today, but there was a period when it didn't because it was moved into the media keyword. I suggested two entries because there wasn't a way to express that gap.

| `media` | Hyper-Schema | 04 | 07 | Replaced `contentEncoding` (legacy) and replaced by `contentEncoding` and `contentMediaType` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keywords in this table are order alphabetically, so media here doesn't make sense?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I don't think we should document Hyper-Schema stuff here. The overall Hyper-Schema specification is on pause, so I suggest ignoring it for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only suggested including media in order to tell the complicated story of contentEncoding. In the beginning, there was only one spec for core, validation, and hyper-schema. I think it would make sense if we considered the original contentEncoding part of hyper-schema even though it wasn't a separate spec yet. Then we can remove these two entries and pretend it was introduced in draft-07 even though it's a little more complicated than that.

| `contentEncoding` | Validation | 07 | No | Replaced `media`.`binaryEncoding` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the notes make sense. contentEncoding never replaced any other keyword. That said, on 2019-09, it became an annotation keyword

| `contentMediaType` | Validation | 07 | No | Replaced `media`.`type` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. I don't think we should bother with Hyper-Schema, and this keyword also became an annotation in 2019-09

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By understanding, the specification covers - Core and Validation.
The hyperschema is a hypermedia vocabulary—I don't think we should have it here; otherwise, we may have to include other hyperschema keywords not considered for dialect migration.

cc: @jdesrosiers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdesrosiers I am still waiting to hear from you. Thank you

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slow response. I've been away almost all of last week and I'm catching up now.

The hyperschema is a hypermedia vocabulary—I don't think we should have it here

There are three specifications: Core, Validation, and Hyper-Schema. Each spec defines one or more vocabularies.

  • Core: core, applicators, unevaluated
  • Validation: validation, format-annotation, format-assertion, meta, content
  • Hyper-Schema: hyper-schema

So, Hyper-Schema is a specification that defines the hyper-schema vocabulary. I was referring to "Hyper-Schema" the spec.

otherwise, we may have to include other hyperschema keywords not considered for dialect migration.

I addressed that in a previous comment. I suggested including it because it was previously moved from Hyper-Schema to Validation and it didn't make sense to say it replaced the old Hyper-Schema keyword without also listing the keyword it replaced. The comment I linked suggests an alternative.

| `contentSchema` | Validation | 2019-09 | No | No |
| `definitions` | Validation | 04 | 2019-09 | Replaced by` $defs` |
| `default` | Validation | 01 | No | No |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 2019-09, this keyword became an annotation

| `dependencies` | Validation | 03 | 2019-09 | Replaced `requires` and replaced by `dependentSchemas` and `dependentRequired` |
| `dependentRequired` | Validation | 2019-09 | No | Partially replaced `dependencies` |
| `dependentSchemas` | Core | 2019-09 | No | Partially replaced `dependencies` |
| `deprecated` | Validation | 2019-09 | No | No |
| `disallow` | Core | 01 | 04 | Replaced by `not` |
| `divisibleBy` | Validation | 02 | No | Replaced by `multipleOf` |
kwennB marked this conversation as resolved.
Show resolved Hide resolved
| `else` | Core | 07 | No | No |
| `enum` | Validation | 01 | No | No |
| `examples` | Validation | 06 | No | No |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 2019-09, this keyword now produces an annotation

| `exclusiveMaximum` (legacy) | Validation | 03 | 06 | Replaced `maximumCanEqual` |
| `exclusiveMaximum` | Validation | 06 | No | Replaced `exclusiveMaximum` (legacy) |
| `exclusiveMinimum` (legacy) | Validation | 03 | 06 | Replaced `minimumCanEqual` |
| `exclusiveMinimum` | Validation | 06 | No | Replaced `exclusiveMinimum` (legacy) |
| `extends` | Core | 01 | 04 | Replaced by `allOf` |
| `format` | Validation | 01 | No | - |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This keyword was turned into an annotation keyword in 2019-09. Also there were many changes in the set of permitted values this keyword could take over varios versions of the specifications. Not sure if we want to document those here

| `id` | Core | 03 | 06 | Replaced by `$id` |
| `if` | Core | 07 | No | No |
| `items` (legacy) | Core | 01 | 2020-12 | Replaced by `prefixItems` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it started producing annotations in 2019-09

Copy link

@suprith-hub suprith-hub Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

items Array is replaced by prefixItems, but items Object isn't so maybe say partially replaced..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the object form of items was removed entirely and additionalItems was renamed items. So, it was partially replaced and partially removed. I don't know how detailed we need to be about that in this table. It's just an overview.

kwennB marked this conversation as resolved.
Show resolved Hide resolved
| `items` | Core | 2020-12 | No | Replaced `additionalItems` and `items` (legacy) |
| `maxContains` | Validation | 2019-09 | No | No |
| `maxProperties` | Validation | 04 | No | No |
| `maximumCanEqual` | Validation | 01 | 03 | Replaced by `exclusiveMaximum` |
| `minimumCanEqual` | Validation | 01 | 03 | Replaced by `exclusiveMinimum` |
| `minContains` | Validation | 2019-09 | No | No |
| `minProperties` | Validation | 04 | No | No |
| `multipleOf` | Validation | 04 | No | Replaced `divisibleBy` |
| `not` | Core | 04 | No | No |
| `oneOf` | Core | 04 | No | No |
| `optional` | Core | 02 | No | Replaced by `required` |
kwennB marked this conversation as resolved.
Show resolved Hide resolved
| `pattern` | Core | 01 | No | No |
| `patternProperties` | Core | 03 | No | No |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 2019-09, this keyword started emitting annotations

| `prefixItems` | Core | 2020-12 | No | Replaced `items` |
| `propertyNames` | Core | 06 | No | No |
| `readOnly` | Validation | 01 | No | No |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 2019-09, this keyword started emitting annotations

| `required` | Validation | 03 | No | No |
| `requires` | Core | 01 | 03 | Replaced by `dependencies` |
| `title` | Validation | 01 | No | No |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 2019-09, this keyword started emitting annotations

| `then` | Core | 07 | No | No |
| `type` (legacy) | Core | 01 | 04 | Replaced by `type` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also weird. I think it's confusing to say type was replaced by type. I think the main change you want to document here is that previously, type could be set to a schema

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The any type was previously valid too, and now it's not. Maybe worth adding a note

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jviotti How best would you say to represent type?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I'm not sure. Maybe this is OK, and we can just clarify that type no longer takes any and subschemas in its array form on the notes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this depends on how much we can put in the "Changed" column. If a brief description of the change can fit in that column, we don't need two entries. The reason I suggested two entries was because I didn't think that was an option. So, I recommend either a description of the changes in "Changes" or two entries, but not both.

| `type` | Validation | 04 | No | Replaced `type` (legacy) |
| `unevaluatedItems` | Core | 2019-09 | No | No |
| `unevaluatedProperties` | Core | 2019-09 | No | No |
| `uniqueItems` | Validation | 02 | Yes | No |
kwennB marked this conversation as resolved.
Show resolved Hide resolved
| `writeOnly` | Validation | 07 | No | No |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 2019-09, this keyword started emitting annotations


For a detailed read-through about all the changes see each Draft migration guide.
kwennB marked this conversation as resolved.
Show resolved Hide resolved
Loading