Open mariolenz opened 10 months ago
I don't think this is the problem, or at lease not the only one. I've tried to change it to if parameter.get("default") is not None
but this didn't help :-/
One other thing that I've found and looks fishy to me:
Having "special cases" like this is an accident waiting to happen, imho.
I'll try to investigate a little bit more, maybe I'm able to find the root cause.
I think this is the problem:
It injects a default that isn't known anywhere else in the code or in the spec, at least as far as I can see. I think generating the documentation is correct, there is no default for bus
. It's tampering with the argument_spec here that leads to the problem.
I don't know why there is this default or if it's really needed. But it looks like it's been in vmware_rest_code_generator since the very first commit:
SUMMARY
The default here is 0, which looks like you're somewhere testing
if default:
. And since 0 is false, the default is not documented.I don't know your code at all, but this already looks a little bit suspicious:
https://github.com/ansible-community/ansible.content_builder/blob/1e706b48b7a1d825d464b697c43355f77cb24fb4/plugins/action/generate_cloud_modules.py#L322-L323
Might be the wrong place in the code, but something like this would explain the missing documentation. Maybe better test on
is not None
or so.I might be completely wrong, but I definitively see this issue in the sanity tests.
ISSUE TYPE
ADDITIONAL INFORMATION
ansible-collections/vmware.vmware_rest#432 ansible-collections/vmware.vmware_rest#434