Open lucaseck opened 2 months ago
Impact here is that the openjd-model-for-python can't be used to programmatically create valid yaml job templates that can be saved out.
The fix for this should be a fairly simple matter of adding more cases to the dictionary value conversion that is happening in https://github.com/OpenJobDescription/openjd-model-for-python/blob/cec9c3cad94480eed949c98cb9cffcbce07ca84b/src/openjd/model/_parse.py#L110-L130
That processing should be ensuring that all of the values returned in the dictionary are basic types (e.g. str rather than something derived from str).
Expected Behaviour
When trying to print a job template to YAML after calling
model_to_object
and then usingyaml.dump
the template is properly formatted and a valid template.Current Behaviour
When trying to print a job template to YAML after calling
model_to_object
and then usingyaml.dump
the template contains what look like objects instead of the strings that those objects are supposed to contain.Reproduction Steps
Ran the code snippet linked below.
Code Snippet
Results in: