-
-
Notifications
You must be signed in to change notification settings - Fork 216
fix buggy test with $ref in older drafts #492
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
all keywords adjacent to $ref have no effect in draft7 and earlier.
I don't know how all your implementations were passing with this test! Maybe you have a bug? |
Sounds like we should have tests against this scenario if it should have failed. |
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.
Can you add a test for the scenario that should fail?
I don't understand what you're asking. The test as it is in the patch is the test that should fail. |
Looking into this more deeply, I don't understand why it should have failed. The The only way the |
When the |
Okay, so you're saying that without the Now that you've corrected the schema to operate as the test cases expect, we still need one that ensures |
We already have tests for that, in ref.json. My goal in this specific PR is to fix a test that should not ever have worked. |
There's probably more we can test in here, e.g. with an adjacent |
Can you link to where we already have it? The closest I found was this, but it wraps the
Yes, but in finding this test that should never have worked, you've identified two cases that should be covered: the case that this is attempting to cover and the case of why this should fail. They each need coverage. |
The failure case cannot be covered. There is no way of expressing a uri resolution failure in our current testing infrastructure. The general case of sibling keywords to $ref being ignored is already covered. The $id keyword specifically is not, but I did say I would handle that in a separate PR. If there are no objections to the changes I have made here, I'm going to merge this. |
|
No it can't, because there's no way to express it with the current testing syntax. If you can come up with something, then by all means. |
all keywords adjacent to $ref have no effect in draft7 and earlier.