Skip to content

fix(REL-13522): convert kebab-case query params to camelCase#705

Merged
LindseyB merged 1 commit intomainfrom
fix/rel-13522-kebab-to-camel-query-params
May 6, 2026
Merged

fix(REL-13522): convert kebab-case query params to camelCase#705
LindseyB merged 1 commit intomainfrom
fix/rel-13522-kebab-to-camel-query-params

Conversation

@LindseyB
Copy link
Copy Markdown
Contributor

@LindseyB LindseyB commented May 6, 2026

This pull request improves the handling of query parameters in the resources command by ensuring that flag names in kebab-case are correctly converted to camelCase when sent as query parameters. It also adds a test to verify this behavior.

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Closes https://launchdarkly.atlassian.net/browse/REL-13522

Describe the solution you've provided

Query parameter formatting improvements:

  • Updated the logic in resources.go so that query parameters are now added using camelCase (e.g., withBranches) instead of the original kebab-case flag name (e.g., with-branches). This ensures consistency with API expectations.

Testing enhancements:

  • Added a new test TestKebabCaseQueryParamConversion in resource_cmds_test.go to verify that kebab-case flags are converted to camelCase query parameters and that the kebab-case version is not present in the query.
example run

Note

Medium Risk
Changes how all resources commands serialize query parameters, which could alter request behavior if any endpoints previously relied on kebab-case names. Scope is small but affects every operation using query params.

Overview
Fixes query parameter naming for generated resources commands. Query params are now sent as lower camelCase (e.g. withBranches) rather than the kebab-case flag name.

Adds a regression test (TestKebabCaseQueryParamConversion) that runs code-refs list-repositories --with-branches true against a mock client and asserts the outgoing query uses withBranches and does not include with-branches.

Reviewed by Cursor Bugbot for commit f0d1199. Bugbot is set up for automated code reviews on this repo. Configure here.

@LindseyB LindseyB requested a review from a team May 6, 2026 19:58
Copy link
Copy Markdown
Contributor

@nieblara nieblara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE!

@LindseyB LindseyB merged commit 98700e4 into main May 6, 2026
12 checks passed
@LindseyB LindseyB deleted the fix/rel-13522-kebab-to-camel-query-params branch May 6, 2026 20:07
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.

3 participants