Skip to content

Commit

Permalink
fix: provide description and meaning to parameters in markdown
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Jose Leiva Palomo <alejandro.leiva.palomo@ibm.com>
  • Loading branch information
AleJo2995 committed Jul 6, 2023
1 parent 7b8cad0 commit 7607153
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions trestle/common/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@

VALUES = 'values'

GUIDELINES = 'guidelines'

SECTIONS_TAG = TRESTLE_TAG + 'sections'

EDITABLE_CONTENT = 'Editable Content'
Expand Down
2 changes: 1 addition & 1 deletion trestle/common/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def _parameter_to_dict_recurse(obj: Union[OscalBaseModel, str], partial: bool) -
Returns:
The converted parameter as dictionary
"""
main_fields = ['id', 'label', 'values', 'select', 'choice', 'how_many']
main_fields = ['id', 'label', 'values', 'select', 'choice', 'how_many', 'guidelines', 'prose']
if isinstance(obj, common.Remarks):
return obj.__root__
if isinstance(obj, common.HowMany):
Expand Down
2 changes: 1 addition & 1 deletion trestle/core/catalog/catalog_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _construct_set_parameters_dict(
# pull only the values from the actual control dict
# all the other elements are from the profile set_param
new_dict[const.VALUES] = orig_dict.get(const.VALUES, None)
else:
new_dict[const.GUIDELINES] = orig_dict.get(const.GUIDELINES, None)
# if the profile doesnt change this param at all, show it in the header with values
tmp_dict = ModelUtils.parameter_to_dict(param_dict, True)
values = tmp_dict.get('values', None)
Expand Down

0 comments on commit 7607153

Please sign in to comment.