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

Tests #828

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Tests #828

wants to merge 2 commits into from

Conversation

tschmidtb51
Copy link
Contributor

  • fixes Add $schema to testcases_json_schema.json #824
  • add missing $schema to testdata schema for CSAF 2.1
  • disallow additional properties for CSAF 2.1
  • add missing $schema to testdata schema for CSAF 2.0
  • disallow additional properties for CSAF 2.0

- addresses parts of oasis-tcs#824
- add missing `$schema` to testdata schema for CSAF 2.1
- disallow additional properties for CSAF 2.1
- addresses parts of oasis-tcs#824
- add missing `$schema` to testdata schema for CSAF 2.0
- disallow additional properties for CSAF 2.0
@tschmidtb51 tschmidtb51 added csaf 2.0 csaf 2.0 work test related to tests in this repo csaf 2.1 csaf 2.1 work labels Nov 18, 2024
@tschmidtb51 tschmidtb51 self-assigned this Nov 18, 2024
@tschmidtb51
Copy link
Contributor Author

@milux / @oxisto: Please review

@@ -79,10 +79,20 @@
}
},
"required": [
"$schema",
Copy link

Choose a reason for hiding this comment

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

In general this is ok for me, since this is also a test file, one just needs to be aware of that specifying the $schema as a property is not really "recommended" or specified by the standard.

Although it is used by many editors (see VSCode https://code.visualstudio.com/docs/languages/json#_mapping-in-the-json) there is no official statement from the specification on that (see https://github.com/orgs/json-schema-org/discussions/473). In the fact the discussion there did not end with any conclusion at all.

I will conduct a small test, whether this actually works at least with the 2 JSON schema generator libraries that we use

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@oxisto Could you please double check that the JSON schema spec does not prohibit the use of $schema in a JSON instance and as defined in the JSON schema. (This might have an impact on #616.)

At the moment, I don't see another way to make sure the location of the schema is known other than to declare which schema should be used to validate ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csaf 2.0 csaf 2.0 work csaf 2.1 csaf 2.1 work test related to tests in this repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add $schema to testcases_json_schema.json
2 participants