Add autocomplete support for API allowedValues - #219
Conversation
| Name string | ||
| Type string | ||
| Related []string | ||
| AllowedValues []string |
There was a problem hiding this comment.
any rationale to add it in the middle?
There was a problem hiding this comment.
any rationale to add it in the middle?
There wasn't a specific reason for placing it there. I grouped it near Related since both are populated from the API discovery response, but I can move AllowedValues to the end of the struct to keep the existing field ordering consistent if that's preferred.
There was a problem hiding this comment.
any rationale to add it in the middle?
I've moved AllowedValues to the end of the APIArg struct to preserve the existing field ordering.
|
✅ Build complete for PR #219. 📦 Binary artifacts are available in the workflow run (expires on August 09, 2026).
|
What does this PR do?
This PR adds support for using the
allowedvaluesmetadata exposed by CloudStack API discovery to provide direct value autocompletion in CloudMonkey.Changes
AllowedValuesto theAPIArgstruct.allowedvaluesfield from the API discovery response inUpdateCache().AllowedValuesduring autocompletion before falling back to the existingfindAutocompleteAPI()heuristic.Behavior
When a parameter exposes
allowedvaluesthrough API discovery, CloudMonkey now suggests those values directly.For example:
Pressing
TABnow suggests values such as:Parameters that do not expose
allowedvaluescontinue to use the existing autocomplete behavior, so there is no behavioral change for parameters without this metadata.Related
Builds on the API discovery changes introduced in apache/cloudstack#13543.