usnistgov / oscal-tools

Tools for the OSCAL project
https://pages.nist.gov/oscal-tools/
34 stars 17 forks source link

Explore feasibilility of schema validation emulator for JSON #56

Open wendellpiez opened 2 years ago

wendellpiez commented 2 years ago

Supporting #50

The current schema emulator validates XML only.

Consider what it would take to function over JSON natively? (Internally, cast to XPath XML JSON.) rather than assuming (nominal) OSCAL XML and having to create that by conversion?

The same template set that now matches (non-) OSCAL XML could also match (non-) OSCAL JSON (as XML).

In support of this, unit tests now being updated in metaschema repo can be used to validate the functionality of the schema emulator around the edges. See https://github.com/usnistgov/metaschema/tree/main/test-suite/schema-generation. These could be used to help validate such a tool also.

Can this be automated by harnessing the XSLT and expressing results for querying?

Additionally, tests made for this project (including end-to-end or 'ornate' examples) should be added to metaschema unit testing.