-
Notifications
You must be signed in to change notification settings - Fork 193
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
Current jsonschema objects (and documentation) appear to have elements which are not in the document definition. #814
Comments
This appears to me to be related to a known issue with identifiers in JSON Schema, addressed (potentially) by PR usnistgov/metaschema#111 - but needs discussion. We are agreed that with the new design, naming these definitions after the source (Metaschema) definitions (alone) is not robust; we have not determined how we would like to provide them with identifiers that are both legible, and unique to the object. |
Great - just FYI this is not a blocker for the work we are doing. It just introduces some 'dead code' for us. |
At one point there was a filter that removed definitions that are not descended from assemblies defined with This filter needs to be restored and tested. This work is happening with usnistgov/metaschema#117 and other Metaschema work items. |
We have re-introduced the filter (mentioned above) to be more assertive in removing unused definitions from both XSD and JSON Schemas. Next, testing to see whether this actually addresses the problems here. |
Describe the bug
In trying to autogenerate code of the latest release (1.0.0rc1) I ran to the fact that a number of objects were defined in the json schema, however, were never referenced in the structure that gets assembled from the root object (e.g.
catalog
orsystem-security-plan
)With json schema as currently setup there are two types of objects:
Given this I wrote a script gist here which searched for 'top level' definitions that were never referenced with a
"$ref"
within the json schema.These elements (and potentially some of the child elements beneath them) are therefore not part of the model:
Root cause at this stage is unknown. This appears to affect xml from my examination on the website as well, however, I have not tested.
Who is the bug affecting?
What is affected by this bug?
All schema objects excluding SSP.
When does this occur?
When using 1.0.0rc1 codebase.
How do we replicate the issue?
Issue should be observable from code itself. Downloading the gist and running:
python3 gist.py path/to/OSCAL/json/schema
should allow the reproduction of the results.
Note:
pip install ilcli
may be required.Expected behavior (i.e. solution)
Remove models which are not included from the root schema.
Other Comments
This may not be an issue. It just looked super strange and feel free to correct me if I am wrong.
The text was updated successfully, but these errors were encountered: