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

Validate wrong results? #1655

Open
SyntaxTalksToMe opened this issue Dec 5, 2023 · 0 comments
Open

Validate wrong results? #1655

SyntaxTalksToMe opened this issue Dec 5, 2023 · 0 comments

Comments

@SyntaxTalksToMe
Copy link

Good day,

If I want to validate a JSON using a schema, I get an incorrect result.

Case 1:
I used the directed SPDX schema. (https://github.com/spdx/spdx-spec/blob/development/v2.3.1/schemas/spdx-schema.json)
I then took an SPDX Json file and deliberately destroyed the structure by deleting elements.
As a result, I received a 0 error count during validation.
However, if I only insert minor errors and do not make major changes to the structure, the validation works.

Case 2:
I had also tested a json that did not match the schema at all. There I also got 0 error counts.

Case 3:
If I try the example from https://medium.com/@niteshsinghal85/validating-json-with-schema-in-net-7bdc02b0ef3c the Validation works as expected.

Basically, I would have expected that no matter which json I wanted to validate using a schema, this would also work and at least get some feedback that something is not taking.
So I wanted to ask if this behavior is correct, or if I have misunderstood something or made a mistake in my thinking about how this validation works.

Thanks and good times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant