-
Notifications
You must be signed in to change notification settings - Fork 183
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
Missing metaschema constraints from jsonschema #1145
Comments
@guyzyl Expressing the choice semantic in JSON Schema is very challenging. You can use This class of problem would be better expressed as a Metaschema constraint, which can be enforced separately from JSON schema validation. This means that all uses of |
@david-waltermire-nist enforcing the constraints via the Metaschemas makes sense, the drawback here is that there isn't that much tooling around Metaschema, especially when compared to jsonschema / XML. |
@guyzyl True. But the tooling around JSON and XML Schema is insufficient as well for our needs. Tooling will catch up. |
…solves usnistgov/OSCAL#1132. Resolves usnistgov/OSCAL#1131. Resolves usnistgov/OSCAL#1003.
I need to review this it appears this is a close as WONTFIX but need to double check. |
At 10/12 Triage Meeting: this issue is being closed because jsonschema does not support. |
After looking over a bit over the jsonschema definitions and the origin metaschema counterpart, I noticed that there constraints that are defined in the metaschemas but are missing from the jsonschemas.
Just as an example, many fields contain a
<choice>
tag in the src metaschema which requires having one of x choices, but this isn't reflected in the jsonschema at all.A concrete example to one -
<define-assembly name="timing">
here which defines achoice
between 3 different fields in the metaschema vs the jsonschema"timing"
here which doesn't reflect this constraint.This is probably not an OSCAL specific issue, and might be a bigger metaschema issue.
Having said that, this either needs to be solved in the schema generation or addressed in the documentation (and forgive me if it's already there).
It seems that this specific example is solvable in jsonschemas (see discussion).
FYI - this discrepancy doesn't exist in the XML schemas.
The text was updated successfully, but these errors were encountered: