Skip to content
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 / special serializer to format values #37

Merged
merged 1 commit into from
Sep 25, 2022

Conversation

felixfontein
Copy link
Collaborator

Use JSON serializing for choices values, same as for default and sample values.

Also use special serializer for INI value examples, and fix INI value example serialization in general. Thus now VALUE is used - as intended - when the option has no default (before it was None), and lists are no longer serialized as ['a', 'b', 'c'], but as a, b, c (['a', 'b', 'c'] is passed as a list whose first entry is ['a', whose second entry is 'b', and whose third entry is 'c'], which is NOT as intended).

Examples:

Copy link

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 I prefer the consistency

Copy link
Contributor

@samccann samccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output LGTM... can't comment on the code :-)

@samccann
Copy link
Contributor

Is this a requirement for 2.14 or just a 'nice to have' since we're past feature freeze date...

@felixfontein
Copy link
Collaborator Author

Is this a requirement for 2.14 or just a 'nice to have' since we're past feature freeze date...

It's not a requirement for 2.14, but it does fix wrong examples in documentation: the None instead of VALUE change is the more harmless of the two bugs fixed, the broken list in https://docs.ansible.com/ansible/devel/collections/ansible/builtin/host_group_vars_vars.html#parameter-_valid_extensions (correct: https://ansible.fontein.de/collections/ansible/builtin/host_group_vars_vars.html#parameter-_valid_extensions) is more serious.

@felixfontein felixfontein merged commit 276823c into ansible-community:main Sep 25, 2022
@felixfontein felixfontein deleted the json-serializer branch September 25, 2022 13:09
@felixfontein
Copy link
Collaborator Author

@tremble @samccann thanks for reviewing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants