-
Notifications
You must be signed in to change notification settings - Fork 9
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
Used, fixed and extended the module.rst.j2 template #253
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c48851b
to
0db7b6c
Compare
7cf6462
to
4596ede
Compare
Details: * For consistency with other IBM Z ansible collections, added the module.rst.j2 template file from the z/OS MF Ansible collections project (https://github.com/IBM/ibm_zos_zosmf), and changed the invocation of ansible-doc-extractor to use it. Note that the file as copied fails on a default value that is a list, and the fixes an extensions are in subsequent commits. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
…tions Details: * The module.rst.j2 template attempted to concatenate an option default value directly with a string in line 60: {% set default = ", default: " + spec.default if spec.default else "" %} If the default value is a list object, the resulting AnsibleSequence object cannot be directly concatenated with the literal string. This change fixes that by adding a 'string' filter to the default. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * So far, the module.rst.j2 template always sorted options by name. The default template used by the ansible-doc-extractor maintains the source order of options. For projects that want to present the options in a certain logical order, it is useful to be able to easily switch those behaviors. This change makes the ordering easily controllable by adding a variable 'sorted' to the 'option_generation' macro that when true produces order by name, and when false keeps the source order. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * So far, the module.rst.j2 template always produced an item 'returned:' for each option, even when the option does not specify a 'returned' property. In that case, there was no value shown. This change omits the 'returned:' item in the output when an option does not specify the 'returned' property. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * The module.rst.j2 template uses the 'tojson' filter added in Jinja2 2.9. Increased the minimum version of Jinja2 from 2.8 to 2.9. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
4596ede
to
0c31af7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The commits are intentionally kept separate:
module.rst.j2
template unchanged from z/OS MF collection