Skip to content

Add map argument autocomplete - #229

Open
dheeraj12347 wants to merge 1 commit into
apache:mainfrom
dheeraj12347:feature/map-autocomplete
Open

dheeraj12347 wants to merge 1 commit into
apache:mainfrom
dheeraj12347:feature/map-autocomplete

Conversation

@dheeraj12347

Copy link
Copy Markdown
Contributor

Summary

Add autocomplete support for map API arguments in CloudMonkey.

Changes

  • Add support for map argument autocomplete.
  • Extract indexed map fields from API argument descriptions.
  • Support generic key/value map descriptions.
  • Suggest indexed fields such as:
    • tags[0].key=
    • tags[0].value=
  • Avoid assuming that every map argument follows the key/value structure.
  • Add regression tests covering:
    • Indexed map fields
    • Multiple map fields
    • Multiple indexes
    • Generic key/value maps
    • Non-key/value map arguments
    • Autocomplete option generation

Testing

  • gofmt -w cli/completer_test.go
  • go test ./...
  • git diff --check

All tests are passing.

@dheeraj12347

Copy link
Copy Markdown
Contributor Author

Hi @Pearl1594 and @DaanHoogland , I’ve raised the map argument autocomplete work as a separate PR: #229.

It adds autocomplete support for map API arguments, including indexed fields like tags[0].key= and tags[0].value=, while avoiding assumptions about maps that don’t follow the key/value structure. I’ve also added regression tests covering the different cases.

go test ./... and git diff --check are passing.

Whenever you’re available, could you please have a look and let me know if the approach looks good or if anything should be changed?

PR: #229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant