Closed
Description
Specification section
Core, probably section 8.2 somewhere. (EDIT: Also section 9.1.2 as noted below.)
What is unclear?
A question came up in Slack for the appropriate behavior when duplicate $id
were found in subschemas. For example:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://test.example/a",
"type": "object",
"properties": {
"f1": {
"$id": "https://test.example/b",
"type": "string"
},
"f2": {
"$id": "https://test.example/b",
"type": "number"
},
"f3": {
"$ref": "https://test.example/b"
}
}
}
The ID https://test.example/b
is declared twice.
This could also apply if multiple $anchor
values were duplicated within the same resource.
Proposal
This should be a "refuse to process" error.
Currently the behavior is undefined, which means an implementation can do what it wants.
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done