Skip to content

Conversation

@kwennB
Copy link
Contributor

@kwennB kwennB commented Oct 24, 2024

What kind of change does this PR introduce?

Documentation

Issue Number:

This is the overview page for Migration, which is part of the effort to create an easy transition between dialect upgrades.

Does this PR introduce a breaking change?

No

@kwennB kwennB added 📝 Documentation Indicates improvements or additions to documentation. GSoD Google Season of Docs labels Oct 24, 2024
@kwennB kwennB self-assigned this Oct 24, 2024
@kwennB kwennB requested a review from a team as a code owner October 24, 2024 10:46
@github-actions
Copy link

github-actions bot commented Oct 24, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 9bbb1c2

@codecov
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5c0ef1b) to head (9bbb1c2).
Report is 210 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1061   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          373       396   +23     
  Branches        94       106   +12     
=========================================
+ Hits           373       396   +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kwennB kwennB marked this pull request as draft October 24, 2024 10:50
Copy link
Member

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

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

I found a few errors in the table. But, also there are several cases that are quite complicated. Hopefully my suggestions fill in some of that history. Feel free to express any of the complicated cases however you see best. My suggestions are just suggestions. If you want to ignore some of the chaos in name of simplifying things a bit, I'm ok with that.

Comment on lines 59 to 61
| `maxContains` | Validation | 2019-09 | No | No |
| `maxDecimals` | Validation | 01 | Yes | Replaced by `divisibleBy` |
| `maxProperties` | Validation | 04 | 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.

I noticed maxItems and minItems are missing entirely in this PR. They've always existed since draft-01 and have never changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@benjagm benjagm added the Status: Do not close This is a long term issue with dependant issues. This label prevent it to be closed automatically. label Jun 20, 2025

| Keyword (Draft-04) | Keyword (Draft-06) | Specification | Keyword Type | Behavior Details |
| ------------------------------------------------ | ----------------------------------------------- | ------------- | ------------------ | ------------------------------------------------------------------------------------------- |
| `id` | `$id` | Core | Identifier | Replaces `id` with `$id` to align with JSON-LD and emphasize its identifier role. |
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 JSON-LD reference here is valid. We don't care about JSON-LD at all and that was not the reason for the $ prefix. This was before me (so might be worth checking with other TSC members), but I believe it was done to more clearly group fundamental keywords together (like $schema)

Copy link
Member

Choose a reason for hiding this comment

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

I can confirm that this change had nothing to do with JSON-LD. That doesn't even make sense because JSON-LD uses @id, not $id.

This was done to make it consistent with the naming of the other core keywords $schema and $ref. Unfortunately, there was no good reason for this change. It was purely cosmetic.

| ------------------------------------------------ | ----------------------------------------------- | ------------- | ------------------ | ------------------------------------------------------------------------------------------- |
| `id` | `$id` | Core | Identifier | Replaces `id` with `$id` to align with JSON-LD and emphasize its identifier role. |
| `exclusiveMinimum`, `exclusiveMaximum` (boolean) | `exclusiveMinimum`, `exclusiveMaximum` (number) | Validation | Numeric Boundaries | Previously booleans tied to `minimum`/`maximum`; now standalone numeric values. |
| `definitions` | `definitions` | Core | Schema Reuse | Still available but less emphasized in later drafts in favor of `$defs` (introduced later). |
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about this one. $defs was introduced in 2019-09. Not sure we want to mention it at all here

Copy link
Member

Choose a reason for hiding this comment

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

I'm sure. This 100% doesn't belong here.

| *not present* | `$vocabulary` | Core | Identifier | Declares which vocabularies a schema uses. Enables modular extensibility. |
| *not present* | `$recursiveRef` | Core | Identifier | Replaces `$ref` in recursive contexts. |
| *not present* | `$recursiveAnchor` | Core | Identifier | Used in base schemas to define recursive entry points. |
| `definitions` | `definitions` | Validation | Object Container | Still supported but now superseded by `$defs` in 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.

I don't think the spec mentions definitions at all. We should suggest $defs. Also $defs was introduced in 2019-09 and not 2020-12 as this page says

Copy link
Member

Choose a reason for hiding this comment

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

Saying it's still supported isn't technically correct. It will accidentally work in most cases, but we should definitely not be telling people it's supported. Just tell people the change the name to $defs.

| *not present* | `$recursiveRef` | Core | Identifier | Replaces `$ref` in recursive contexts. |
| *not present* | `$recursiveAnchor` | Core | Identifier | Used in base schemas to define recursive entry points. |
| `definitions` | `definitions` | Validation | Object Container | Still supported but now superseded by `$defs` in 2020-12+. |
| `id` | `$id` | Core | Identifier | Already introduced in Draft 6, still used in Draft 2019-09. |
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 this is correct. Starting on Draft 6, only $id is supported

Copy link
Member

Choose a reason for hiding this comment

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

It's wrong that the name changed, but there was a change to $id in 2019-09 that should be described in this entry. The change was splitting out schema identification and anchor identification.

Copy link
Member

Choose a reason for hiding this comment

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

And id existed before draft 6.

| `definitions` | `definitions` | Validation | Object Container | Still supported but now superseded by `$defs` in 2020-12+. |
| `id` | `$id` | Core | Identifier | Already introduced in Draft 6, still used in Draft 2019-09. |
| `examples` | `examples` | Annotation | Informational | Remains unchanged. |
| `readOnly` / `writeOnly` | `readOnly` / `writeOnly` | Annotation | Informational | Remains unchanged. |
Copy link
Member

Choose a reason for hiding this comment

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

Here we mention two keywords in one row, whereas I think before we always broke things in multiple rows (like for if/then/else). Let's be consistent across pages?

Copy link
Member

Choose a reason for hiding this comment

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

Better yet, remove it and examples because this is a change log and nothing about those three keywords has changed.




#### Step 3: Use `$recursiveAnchor` and `$recursiveRef` for recursive structures
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure the example here really exemplifies dynamic referencing. It is not just about recursive structures but about generic/templated schemas. That said, it's a bit hard to exemplify that well here. I remember Greg wrote a blog post about this. Maybe worth just linking to that?


#### Step 4: Continue using supported keywords like `readOnly`, `writeOnly`, `examples`

These keywords remain valid and unchanged:
Copy link
Member

Choose a reason for hiding this comment

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

With the exception that they now emit annotations, which was not the case before

Copy link
Member

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

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

Here's a partial review. It covers the overview and the 2020-12 migration, plus some responses to Juan's comments. I'll review the rest later.

In addition to the inline comments, please note that the following keywords are missing from the main overview: minimum, maximum, minLength, and maxLength.


| Keyword (Draft-04) | Keyword (Draft-06) | Specification | Keyword Type | Behavior Details |
| ------------------------------------------------ | ----------------------------------------------- | ------------- | ------------------ | ------------------------------------------------------------------------------------------- |
| `id` | `$id` | Core | Identifier | Replaces `id` with `$id` to align with JSON-LD and emphasize its identifier role. |
Copy link
Member

Choose a reason for hiding this comment

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

I can confirm that this change had nothing to do with JSON-LD. That doesn't even make sense because JSON-LD uses @id, not $id.

This was done to make it consistent with the naming of the other core keywords $schema and $ref. Unfortunately, there was no good reason for this change. It was purely cosmetic.

| ------------------------------------------------ | ----------------------------------------------- | ------------- | ------------------ | ------------------------------------------------------------------------------------------- |
| `id` | `$id` | Core | Identifier | Replaces `id` with `$id` to align with JSON-LD and emphasize its identifier role. |
| `exclusiveMinimum`, `exclusiveMaximum` (boolean) | `exclusiveMinimum`, `exclusiveMaximum` (number) | Validation | Numeric Boundaries | Previously booleans tied to `minimum`/`maximum`; now standalone numeric values. |
| `definitions` | `definitions` | Core | Schema Reuse | Still available but less emphasized in later drafts in favor of `$defs` (introduced later). |
Copy link
Member

Choose a reason for hiding this comment

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

I'm sure. This 100% doesn't belong here.

| *not present* | `$vocabulary` | Core | Identifier | Declares which vocabularies a schema uses. Enables modular extensibility. |
| *not present* | `$recursiveRef` | Core | Identifier | Replaces `$ref` in recursive contexts. |
| *not present* | `$recursiveAnchor` | Core | Identifier | Used in base schemas to define recursive entry points. |
| `definitions` | `definitions` | Validation | Object Container | Still supported but now superseded by `$defs` in 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.

Saying it's still supported isn't technically correct. It will accidentally work in most cases, but we should definitely not be telling people it's supported. Just tell people the change the name to $defs.

| *not present* | `$recursiveRef` | Core | Identifier | Replaces `$ref` in recursive contexts. |
| *not present* | `$recursiveAnchor` | Core | Identifier | Used in base schemas to define recursive entry points. |
| `definitions` | `definitions` | Validation | Object Container | Still supported but now superseded by `$defs` in 2020-12+. |
| `id` | `$id` | Core | Identifier | Already introduced in Draft 6, still used in Draft 2019-09. |
Copy link
Member

Choose a reason for hiding this comment

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

It's wrong that the name changed, but there was a change to $id in 2019-09 that should be described in this entry. The change was splitting out schema identification and anchor identification.

| `definitions` | `definitions` | Validation | Object Container | Still supported but now superseded by `$defs` in 2020-12+. |
| `id` | `$id` | Core | Identifier | Already introduced in Draft 6, still used in Draft 2019-09. |
| `examples` | `examples` | Annotation | Informational | Remains unchanged. |
| `readOnly` / `writeOnly` | `readOnly` / `writeOnly` | Annotation | Informational | Remains unchanged. |
Copy link
Member

Choose a reason for hiding this comment

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

Better yet, remove it and examples because this is a change log and nothing about those three keywords has changed.

@github-project-automation github-project-automation bot moved this from Unclear to Changes requested in PR - Triage Group Jul 25, 2025
Copy link
Member

@jdesrosiers jdesrosiers left a comment

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 migration notes for each release are working out. They still need a lot of work to fix errors and include enough detail to be useful. They're nowhere near ready to replace the release notes.

I suggest narrowing the scope of this PR. Let's just do the overview for now with links to the existing release notes. Then we can figure out what to do for the individual migration guides separately.

@kwennB
Copy link
Contributor Author

kwennB commented Sep 14, 2025

I don't think the migration notes for each release are working out. They still need a lot of work to fix errors and include enough detail to be useful. They're nowhere near ready to replace the release notes.

I suggest narrowing the scope of this PR. Let's just do the overview for now with links to the existing release notes. Then we can figure out what to do for the individual migration guides separately.

Hello @jdesrosiers do you think the current overview is not accurate as well?

I do agree that the migration for specific pages can be better on review now. But if we want to de-scope this to the overview only, are we not there?

@jdesrosiers
Copy link
Member

I think the overview is mostly fine except you still haven't addressed #1061 (review) ...

please note that the following keywords are missing from the main overview: minimum, maximum, minLength, and maxLength.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📝 Documentation Indicates improvements or additions to documentation. GSoD Google Season of Docs Status: Do not close This is a long term issue with dependant issues. This label prevent it to be closed automatically. Status: In Progress This issue is being worked on, and has someone assigned.

Projects

Status: In Progress
Status: Changes requested

Development

Successfully merging this pull request may close these issues.

[📝 Docs]: Create a Migration page for the Specification docs

9 participants