-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Support recursive suboptions schema #37206
Support recursive suboptions schema #37206
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that was easy :)
@@ -171,6 +173,6 @@ def metadata_1_1_schema(deprecated): | |||
# 1) Don't allow empty options for choices, aliases, etc | |||
# 2) If type: bool ensure choices isn't set - perhaps use Exclusive | |||
# 3) both version_added should be quoted floats | |||
# 4) Use Recursive Schema: https://github.com/alecthomas/voluptuous/issues/128 though don't allow two layers | |||
# 4) Use Recursive Schema via `Self`, see `suboption_schema` above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this line now as this is tracking other todo's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the version constraint for voluptuous to test/runner/requirements/constraints.txt
.
Done. |
This reverts commit 8980d27.
SUMMARY
argument_spec
allows "recursive" options, the documentation should allow recursivesuboptions
.This requires voluptuous>=0.11.0
See #37196
ISSUE TYPE
COMPONENT NAME
test/sanity/validate-modules/schema.py
ANSIBLE VERSION
ADDITIONAL INFORMATION
Before:
After: