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

added oneOf schema validation #787

Merged
merged 2 commits into from
Nov 9, 2022
Merged

Conversation

msivasubramaniaan
Copy link
Contributor

Signed-off-by: msivasubramaniaan [email protected]

What does this PR do?

This PR throws validation error if multiple schema matches from oneOf

What issues does this PR fix or reference?

redhat-developer/vscode-yaml#769

Is it tested? How?

Yes added UT

Signed-off-by: msivasubramaniaan <[email protected]>
@coveralls
Copy link

coveralls commented Sep 28, 2022

Coverage Status

Coverage increased (+0.05%) to 83.032% when pulling 8667cb6 on 769-oneOf-schema-validation into 7853bfd on main.

if (subValidationResult.propertiesMatches === 0) {
noPropertyMatches.push(subSchema);
}
if (subSchema.format) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For address #586 omit the matches when string format matched

@stevestrutt
Copy link

@gorkem it would be great it this could be reviewed as I'm also experiencing this issue. Surprised it is flagged as an enhancement as it did work at 1.2.2.

Copy link
Collaborator

@gorkem gorkem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@msivasubramaniaan msivasubramaniaan merged commit b2b9d66 into main Nov 9, 2022
@msivasubramaniaan msivasubramaniaan deleted the 769-oneOf-schema-validation branch November 9, 2022 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants