-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support to parse oscal document #17
Conversation
@abunashir we should update the oscal gem and republish the latest version for the coradoc-oscal functionality to work |
oscal.yml
Outdated
- !ruby/object:Oscal::Control | ||
id: cls_5.1 | ||
props: | ||
- !ruby/object:Oscal::Property |
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.
@abunashir is it possible to remove the Ruby class designator here? I thought we just need to call Oscal::Catalog.to_yaml
and the YAML file would not contain classes.
This is a "defined YAML structure" for OSCAL, we cannot change it by inserting Ruby-specific content.
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.
It is possible, but I assume we have to fix the to_yaml
issue in Oscal
and their Objects. For now, I just double transformed the doc and that should fix the issue for now. But, we definitely have to fix that soonish.
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.
Yes we will need to update the to_yaml methods in the OSCAL gem. The back is okay for now. Thanks.
This is the task:
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 can verify that the hack works. Thanks.
This commit adds base support to parse an OSCAl document, this also provides a simplified way to get the ascidoc parsed into a structured YAML document. To parse any oscal document we can use the following. ```ruby Coradoc::Oscal.parse_to_yaml(sample_oscal_adoc) ```
This commit adds base support to parse an OSCAl document, this also provides a simplified way to get the ascidoc parsed into a structured YAML document. To parse any oscal document we can use the following.