-
Notifications
You must be signed in to change notification settings - Fork 260
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
fix: nested anyof const #888
fix: nested anyof const #888
Conversation
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.
This looks good. If you can rebase and adjust to the testing changes main we are good to go.
test/schemaValidation.test.ts
Outdated
}, | ||
}, | ||
}; | ||
languageService.addSchema(SCHEMA_ID, schema); |
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 rebase this commit to head and use schemaProvider.addSchema
it is the new mechanism for feeding schemas for tests and since we have removed the earlier hack in the parser this will probably fail.
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.
thanks, @gorkem done,
I also pushed a small change for const matching.
there was a small inconsistency between enum
and const
match.
Enum allows having a partial match, but const had to be exactly the same.
It's a little bit related to this PR, so sorry for putting it together...
85360c8
to
17b06d6
Compare
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.
lgtm
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.
LGTM
What does this PR do?
fix validation of nested
anyOf
constsschema:
will produce this error:
Screen.Recording.2023-06-02.at.12.59.40.mov
note that 'missing form property' is necessary to trigger the bug (there has to be some problem in both subSchemas)
order of the object in
anyOf
is also importantWhat issues does this PR fix or reference?
no existing issue
Is it tested? How?
unit test