-
-
Notifications
You must be signed in to change notification settings - Fork 67
Preserve keys, but fix potential JSON pointers to reflect actual DOM… #125
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
Conversation
…path Signed-off-by: Matt Rutkowski <[email protected]>
@mrutkows |
@jkowalleck Hi Jan, if you wish I can carry these changes over to the "Strict" version of 1.3 and had not thought to propagate the changes backwards to 1.2, but can if you wish. |
@mrutkows i was asking more to get an answer whether the other files need to be also modified, if we would go with the proposed solution of this very PullRequest. I think we need to be aware that this PR is a draft, not a final solution. |
@jkowalleck of course, the "strict" version of 1.3 should have the changes as well... as for 1.2 that is a community decision as to how they want to support past releases (as I have not even looked into the 1.2 schema). If the problem exists there, I would be inclined to fix it there as well. |
Signed-off-by: Matt Rutkowski <[email protected]>
@jkowalleck committed a propagation of these proposed $id fixes to 1.3-strict, 1.2 and 1.2-strict json schema files. Please note that the 1.2 schemas only produced 2 of the 3 errors (because there was no "collision" for the "hashes" $id) this was due to v1.2 the "externalReference" object did not contain that "hashes" property; however the "tool" object still had "hashes" with the incorrect $id. Therefore I also fixed carried over the corresponding 1.3 change to include the proper relative (JSON pointer, fragment) path still applied (in case the 1.2 version ever adds "hashes" to other objects in the future). Verified all schema errors for 1.3, 1.3-strict, 1.2 and 1.2-strict were fixed with these changes within https://www.liquid-technologies.com/online-json-schema-validator |
thanks a lot, @mrutkows |
This PR seeks to suggest what could be least-invasive fix for the duplicate
$id
issue as described in #123.It preserves all $id tags in case they were being used to reference schema objects from external schemas, but simply fixes those
$id
whose value (URI fragments), if used as JSON pointers (into the JSON schema document) did not match the actual object hierarchy of the actual document object model (DOM).