-
Notifications
You must be signed in to change notification settings - Fork 2
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
use JSON Serialization to provide the value returned by the metaquery #24
Conversation
cmdLine.hasOption(CONTENT_OPTION) -> { | ||
LOGGER.warn("Content option provided without Metaschema option") | ||
return ExitCode.INVALID_ARGUMENTS.exitMessage( | ||
"Must use '${CONTENT_OPTION.argName}' to specify the Metaschema module." | ||
) | ||
} | ||
else -> { | ||
LOGGER.info("No Metaschema or Content option provided") | ||
Pair(null, null) | ||
LOGGER.info("No Content option provided") | ||
null |
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.
Non-blocking: in some cases this should work, there has been a regression potentially. FYSA:
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 think we should pursue this in another PR, but this is good to know, so a metapath just executing inline?
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 think we should pursue this in another PR
Agreed, feel free to resolve.
but this is good to know, so a metapath just executing inline?
Correct, when there are lower-level syntax errors, I actually use this, you may have noticed I also use it during our pairing sessions, the local API approach will make it much faster. 😉
% oscal-cli --version
oscal-cli 2.2.0 built at 2024-10-08 23:48 from branch 0b9478792d27837a8967cc72a0c98776b24f7102 (0b94787) at https://github.com/metaschema-framework/oscal-cli
liboscal-java built at 2024-10-08 22:12 from branch 0e7de882592dedef37a1fc30101393e6c4fe71f3 (0e7de88) at https://github.com/metaschema-framework/liboscal-java
oscal v1.1.2 built at 2024-10-08 22:12 from branch 4f02dac6f698efda387cc5f55bc99581eaf494b6 (4f02dac) at https://github.com/usnistgov/OSCAL.git
metaschema-java 1.2.0 built at 2024-10-08T20:00:42+0000 from branch 46df8d8fc25c5de1d7cb0485e534f31efe61b2b7 (46df8d8) at https://github.com/metaschema-framework/metaschema-java
metaschema built at 2024-10-08T20:00:42+0000 from branch 7c03ce5844e46cf9d047193a37e44422ae6a7d61 (7c03ce5) at https://github.com/metaschema-framework/metaschema.git
% oscal-cli metaschema metapath eval -e "2 * 2"
4
I use this to check syntax before/with constraint authoring. This found some bugs with the output wrapping with sequence ()
and other output weirdness in #228.
src/main/kotlin/gov/nist/secauto/oscal/tools/server/core/commands/OscalQueryCommand.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/gov/nist/secauto/oscal/tools/server/core/commands/OscalQueryCommand.kt
Show resolved
Hide resolved
…nds/OscalQueryCommand.kt Co-authored-by: A.J. Stein <[email protected]>
No description provided.