-
Notifications
You must be signed in to change notification settings - Fork 9
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
Hotfix/json schema #113
Hotfix/json schema #113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of AJV validation.
As I remarked to @wandmagic in another channel, I do not like adding a Node JS dependency here. This test needs to be conducted, but adding dependencies only creates more technical debt. (But I think it could be a good thing in a calling repository. Maybe the OSCAL repository already has a call on Any comments on #110? |
Hey i've made the node JS dependency optional in the latest commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if an illustration of the intended result JSON Schema could be provided, along with a pointer to the metaschema source file from which it is derived.
This has to be unit tested; it is possible the path could be collapsed further (removing support for @prefer) following Metaschema adjustment in usnistgov/metaschema#558.
Given copies of the source metaschema, the intended result and the current result (from a run), I can build a unit test that isolates this path logic and presents examples of the range of expected inputs.
This way when we patch the path logic we also expose assurance that it works (under many eyes), and we will not thrash.
Thanks for diligence so far @wandmagic
see the output of current develop branch and the output from this branch |
Thanks much, @wandmagic For transparency and the record, could I bother you also to provide code illustrations of the before-and-after? This is mainly because I expect to provide this work with the unit testing to support it (validate and protect against regression), and it would save me a couple steps in writing it. But additionally because it makes the work easier to track for everyone. |
@wandmagic thanks for the snips, very helpful indeed for repro. |
Committer Notes
The Json schema generation has an issue with creating the names for deginitions.
This pull request adds rudimentary testing to compile a json schema as a function which is only possible for valid schemas.
currently there is a warning regarding the decimal type, and that is addressed by a pull request up-stream.
usnistgov/metaschema#572
All Submissions:
Changes to Core Features: