Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
base: main
Are you sure you want to change the base?
Added migration page overview #1061
Changes from all commits
859a6f1
93bcaba
d4c8b24
8eb9721
75ee2a1
a967f66
b22b2ff
c5d352e
136ee2e
fa6391b
83536f1
dd364ba
dd1d4e7
33b69ab
9c583ce
5a4b8b3
24488f9
4e5a08d
d17e308
c5b1f87
95276a0
288e5d9
7199292
8cc36f0
45aecbc
65ba898
9891c6e
5bdfc65
3ef35de
a68d4f3
65325b8
419ea36
43f9816
bb62eaa
757f1f9
5eae100
93da171
994f731
ffcf639
b439468
85b9ceb
81ebeea
d718e51
3a5a632
33e536b
266963b
e75e0da
78d912a
5a46c9d
91c3b63
ddec102
f0fd4c2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing change description. I think there were some changes to what formats are defined, but otherwise there weren't any changes in the behavior of this keyword.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still unsure how to better describe the
format
keyword, seeing that changes and discussions are ongoing.Yes noted for
change
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this for
format
change description:The format keyword retains its core function but has undergone several modifications: the attributes
phone
,style
, andcolor
have been removed;ip-address
has been renamed toipv4
; and references for all attributes have been added to enhance clarity and usability.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should
id
be included in the table?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it was only used as a reference example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't understand your response. The infobox is describing a change to how
id
behaves from draft-03 to draft-04. The table above lists all keyword changes that occurred between draft-03 and draft-04. So, I don't see whyid
wouldn't be included.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I was trying to communicate with the infobox.
On Draft 3, it was defined as :
This attribute defines a URI of a schema that contains the full
representation of this schema. When a validator encounters this
attribute, it SHOULD replace the current schema with the schema
referenced by the value's URI (if known and available) and re-validate
the instance. This URI MAY be relative or absolute, and relative URIs
SHOULD be resolved against the URI of the current schema.
And on Draft 4:
The value for this keyword MUST be a string, and MUST be a valid URI. This URI MUST be normalized, and SHOULD NOT be an empty fragment (#) or the empty URI.
--
So it was not only about
id
.But thank you for pointing out
id
; I checked and noticed I skipped adding it here because it didn't change to$id
until draft 6. So I will include it here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something, but I don't think that's true. You've quoted the definition of
$ref
for draft-03, notid
. Maybe that's a source of confusion? Both definitions describe the behavior ofid
and nothing more. The draft-03 definition is pretty vague and the draft-04 definition isn't great either, but the only clear difference is that empty URIs and empty fragments are discouraged.Actually, the spec says "SHOULD", not "MUST". So, technically those empty values aren't disallowed, it's just recommended that schema authors don't use them. I think that's a good argument for not considering this not a change and leaving it out of the migration page altogether. Implementations in both drafts should consider those values to effectively be a no-op. The only difference is that draft-04 tells schema authors not to use that particular nonsense value. I'd argue that nothing actually changed in the behavior of
id
from draft-03 to draft-04.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't correct. There was originally only one spec that included everything. Everything that we now consider Core, Validation, and Hyper-Schema was included in that one spec. In draft-04, the one spec was split into the three parts we're familiar with today. So, the spec didn't expand in draft-04 to include validation. Validation was always there. It just split that content into a different document.
This may be too much detail, but what has gone in each document has changed over time as well. The Content vocabulary and a few Meta-Data keywords moved from Hyper-Schema to Validation (draft-07) and the Applicator vocabulary moved from Validation to Core (2019-09).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the one spec?
If you also stated that there was originally only one specification, at what point did the Validation become necessary?
Thank you. I will phrase this better.
Are there any more data for scenarios like this?
To better represent this Spec note, what would be the most nearly accurate detail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean. Draft-01, draft-02, and draft-03 were all just one spec that included what is now Core, Validation, and Hyper-Schema. It didn't really have another name like the three do now. It was just the JSON Schema spec.
Validation was always part of the spec. It was included from the first draft. It was always necessary.
I think this kind of information is in the release notes for each draft. The older drafts don't have release notes, but those didn't have these kinds of changes.
Honestly, I'm not sure what this spec note is trying to communicate. Is it just that there are now three specs instead of one?1 That was just a change in the way the spec was maintained. It has little affect on what people can and can't do with JSON Schema. However, splitting off Hyper-Schema meant draft-04 was the first draft where you could implement JSON Schema without including Hyper-Schema support. Implementers could implement Core and Validation and treat Hyper-Schema as an extension that they don't support.
Footnotes
Actually, it was broken into four specs: Core, Validation, Hyper-Schema, and JSON Reference. But, JSON Reference wasn't maintained by us. JSON Reference was merged back into Core in draft-06. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for clarifying about the initial "JSON Schema Spec".