Skip to content
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

anyOf not providing correct results for instance/schema location #245

Closed
ItsVeryWindy opened this issue Mar 30, 2022 · 3 comments · Fixed by #247
Closed

anyOf not providing correct results for instance/schema location #245

ItsVeryWindy opened this issue Mar 30, 2022 · 3 comments · Fixed by #247
Labels
bug Something isn't working pkg:schema

Comments

@ItsVeryWindy
Copy link

Describe the bug
I noticed something unusual with the results I was getting back whilst using anyOf as the instance and schema locations didn't match what I was expecting. This one seems pretty straightforward, as in this instance anyOf is pushing the schema location as the instance location. I've included a link to the line with the issue as well as what it probably should be for reference.

https://github.com/gregsdennis/json-everything/blob/master/JsonSchema/AnyOfKeyword.cs#L63
https://github.com/gregsdennis/json-everything/blob/master/JsonSchema/AllOfKeyword.cs#L63

@ItsVeryWindy ItsVeryWindy added the bug Something isn't working label Mar 30, 2022
@gregsdennis
Copy link
Owner

gregsdennis commented Mar 30, 2022

Thanks @ItsVeryWindy. In your experience, is this only affecting output, or is there something wrong with validation outcomes?

@ItsVeryWindy
Copy link
Author

As far as I can see it's only affecting output, however there aren't many places where I am using anyOf at the moment. I'm only picking up some of these issues because I've got test code that relies on being able to evaluate the instance and schema locations.

@gregsdennis
Copy link
Owner

Sounds good. I'll see if I can push out an update tonight. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:schema
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants