Hi,
I am trying to understand how to document, specifically documentation 
fragments.
following the examples from the documentation everything works, I am able 
to insert fragments that merge into `DOCUMENTATION`

But I came into trouble with inserting return type fragments.
I have been trying to follow the way win_get_url 
<https://github.com/ansible-collections/ansible.windows/blob/main/plugins/modules/win_get_url.ps1>
  
works.
It is backed by a module util, namely WebRequest, which injects its own 
output into the final output: WebRequest 
<https://github.com/ansible-collections/ansible.windows/blob/main/plugins/module_utils/WebRequest.psm1#L467>
 adding 
additional values ('msg') to the return dictionary without any work from 
the module itself.

win_get_url hard codes 
<https://github.com/ansible-collections/ansible.windows/blob/main/plugins/modules/win_get_url.py#L178>
 these 
additional return values into its documentation. I do not see any 
deliberate usage of this value in win_get_url's code. I expected this kind 
of behavior to be backed by a `RETURN` documentation fragment but it is not.


I have also searched and found return_common.py 
<https://github.com/ansible/ansible/blob/2cbfd1e350cbe1ca195d33306b5a9628667ddda8/lib/ansible/plugins/doc_fragments/return_common.py#L11>
 which 
does exactly what I want? but I see no usages of it anywhere 
<https://github.com/ansible/ansible/search?q=return_common>

How to add a documentation fragment of return values? 


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1813da11-c6a9-4238-a97a-2bbb3f735797n%40googlegroups.com.

Reply via email to