-
Notifications
You must be signed in to change notification settings - Fork 40
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
Ref resolve failure when using custom metaschema #293
Comments
Hi, thanks for reporting this! I'm actually in the midst of updating ref resolution (#289), so there's a body of work which may fix this issue. But I'd like to have a test case to confirm the fix. I'll try to look into this bug in the coming days, but I can't promise any specific timeline yet. |
@sirosen it is exactly this schema https://json-schema.org/draft/2020-12/schema with two added properties:
However, using the default schema alone also fails. Instead it will pass (though of dubious utility to do so) if these are removed.
I'm open to the idea that we're doing it wrong™ as well. Just trying to understand what is happening before we decide what we want to do about it. |
Relative dyanicRef usage was resolved incorrectly in the prior implementation, but it has been fixed by correct use of `referencing`. Test to ensure that this case is satisfied. See also: #293
I've just been able to circle back to this and add a test case based on the information you provided which reproduces the issue. The test passes on the work in #289, so I feel quite confident that this is/was a bug in reference resolution which is resolved by that change. The new test is now part of that branch, so we can be confident that this will be fixed when that's released. |
Since this broke without us updating the check-jsonschema version. After jsonschema updated, with the requirements unpinned for that library in the build... is it possible that update caused this? |
Sorry to be slow to get back to you; yes, it's definitely possible that something broke in an upstream update and percolated down to you. July 12th correlates with a few bugfixes which were released in I've just merged the change to use the new implementation, and should have a |
|
@sirosen looks like it works! Or at least the error is new. Will take it from here, I think that solved the issue. |
@sirosen upgrading from 0.23.3 to 0.24.0 caused this error to occur. for instance, it happens with:
i think that the issue needs to be reopened. what do you advise? |
My concern here is that these schemas may contain errors, and that by changing the implementation to be more correct, those errors are now apparent. This definitely merits investigation, but I'd prefer to do it in a separate issue rather than reopening this one. The causes of these errors are different and I'd like to keep the threads separate. |
Hm. I just reread what I thought was an error in one of those schemas and I was mistaken; it looks fine. I'll need to look more deeply to get a clear idea of what's happening. (But expect me to file a new issue shortly.) |
will be waiting closely. thank you :) |
@foolioo, could you file a new issue with details on what you're seeing? Including not just a reference to the source schema but whatever error you're seeing? I just tried the pre-commit-hooks schema and this worked fine:
I jumped the gun earlier by starting to look for an explanation before confirming that I could reproduce the issue. |
On July 12th it was noticed that our github action using check-jsonschema was failing. No update had been applied to the code so it was believed to be a build time/runtime issue. The following error appears:
In 'https://json-schema.org/draft/2020-12/meta/meta/applicator' the second meta doesn't exist. If you monkey patch the code to replace 'meta/meta/' with 'meta' the code will proceed to fail on meta/meta/meta/. Eventually it will run correctly if you repeat this several times.
Back ground:
We have a slightly modified Draft202012 metaschema with an added
"unevaluatedProperties": false
to catch typos. This is run as a github action using the following pre-commit config.EDIT: Using the meta schema directly with jsonschema does not cause an error. The error occurs when using check-jsonschema v 0.8 or later.
The text was updated successfully, but these errors were encountered: