Title: Use Related metadata for autocomplete API discovery by dheeraj12347 · Pull Request #214 · apache/cloudstack-cloudmonkey · GitHub
Open Graph Title: Use Related metadata for autocomplete API discovery by dheeraj12347 · Pull Request #214 · apache/cloudstack-cloudmonkey
X Title: Use Related metadata for autocomplete API discovery by dheeraj12347 · Pull Request #214 · apache/cloudstack-cloudmonkey
Description: Summary Fixes apache/cloudstack#10442 CloudMonkey already parses and stores the Related metadata exposed by CloudStack APIs in APIArg.Related, but findAutocompleteAPI() did not use this information during autocomplete API discovery. This change updates autocomplete API selection to prefer authoritative Related metadata before falling back to the existing heuristic-based lookup logic. This improves reliability for entity-reference parameter completion while preserving backward compatibility with the current behavior. Changes Use APIArg.Related when selecting the autocomplete lookup API. Prefer Related APIs whose noun matches the expected resource noun. Fall back to any valid Related list* API if no noun match is found. Preserve all existing heuristic-based lookup logic as a fallback. Add unit test coverage for Related-based autocomplete API discovery. Validation Verified runtime behavior for common entity-reference parameters: zoneid → listZones domainid → listDomains networkid → listNetworks Added unit tests covering: Related noun match selection. Related API fallback selection. Empty Related metadata fallback to existing heuristics. Non-list Related metadata fallback to existing heuristics. Map-type argument handling. Build and validation: go fmt ./... go test ./... go build -o bin/cmk . Test results: ok github.com/apache/cloudstack-cloudmonkey/cli
Open Graph Description: Summary Fixes apache/cloudstack#10442 CloudMonkey already parses and stores the Related metadata exposed by CloudStack APIs in APIArg.Related, but findAutocompleteAPI() did not use this information...
X Description: Summary Fixes apache/cloudstack#10442 CloudMonkey already parses and stores the Related metadata exposed by CloudStack APIs in APIArg.Related, but findAutocompleteAPI() did not use this information...
Opengraph URL: https://github.com/apache/cloudstack-cloudmonkey/pull/214
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b2f61a18-4bee-d494-cd2a-bc89d4bb658d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ACAA:20C9D0:5BC913:7DF208:6A4DCDBD |
| html-safe-nonce | 9d9aac2a5e6edbb1d2c96269b7fd7595e2b7685ef7d8e92a5f8f4122d6f9d10a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0FBOjIwQzlEMDo1QkM5MTM6N0RGMjA4OjZBNERDREJEIiwidmlzaXRvcl9pZCI6IjQxODg0NzI2MDQ0MjY2MjAzNDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e661f326000db50949733c68b2bc03da97cf453e51149664ab10f079149a5269 |
| hovercard-subject-tag | pull_request:3826616646 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/apache/cloudstack-cloudmonkey/pull/214/files |
| twitter:image | https://avatars.githubusercontent.com/u/184014271?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/184014271?s=400&v=4 |
| og:image:alt | Summary Fixes apache/cloudstack#10442 CloudMonkey already parses and stores the Related metadata exposed by CloudStack APIs in APIArg.Related, but findAutocompleteAPI() did not use this information... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/apache/cloudstack-cloudmonkey git https://github.com/apache/cloudstack-cloudmonkey.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 13641478 |
| octolytics-dimension-repository_nwo | apache/cloudstack-cloudmonkey |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13641478 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack-cloudmonkey |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width