-
Notifications
You must be signed in to change notification settings - Fork 19
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
Glitch in (unused) feature on json-value-key
#169
Comments
We may want something like:
or
|
Okay on |
Noting that when we make this change we break the converters, etc. |
Closed after reviewing, it is complete. |
P.S.: merge the feature branch back into develop before it is "complete complete." @david-waltermire-nist is doing that now as we speak. |
This issue is part of current dev work and is already being done by Wendell and Dave in #195. Will update in triage board accordingly. |
json-value-key/@flag-name - feature or residue?
Metaschema
json-value-key
can be used with@flag-name
, indicating not that the value of the element is to be used as literal key for the (nominal) field value, but that the key value is assumed to serve as the value of a flag given on the field. That is, any property in the JSON not defined as a flag, is taken to be a pairing of flag (value) with value. This affords a kind of abbreviation:In XML this would be (note the 'value' is the 'value' of the element):
while in JSON (where the value must be a property key/value like anything else):
However this metaschema (example) is not currently valid against the XSD for Metaschema, which defines
json-value-flag
as typeNCName
, which does not permit an empty (null) value.This feature not used anywhere in the OSCAL schemas. (So it could be argued we do not actually support it since there is no valid way to express it.)
Do we wish to deprecate use of
json-value-key/@flag-name
removing it from the schema altogether (and ripping out code that supports it)?If we wish to support it we need to be able to validate it, which we currently cannot since the
NCName
type (as mentioned) requires a value, and using the@flag-name
we specifically wish not to designate a literal name (for the value key) but assign it dynamically.Who is the bug affecting?
Currently we are not using this feature in OSCAL, so related code is a no-op and no unwanted validation errors are encountered.
What is affected by this bug?
Anyone using this feature of Metaschema.
When does this occur?
Anytime schema validation is performed on an OSCAL metaschema with
define-field/json-value-key/@flag-name
.Other Comments
If the feature is to be removed, let's remove the
flag-name
attribute?The text was updated successfully, but these errors were encountered: