fix(REL-13522): convert kebab-case query params to camelCase#705
Merged
fix(REL-13522): convert kebab-case query params to camelCase#705
Conversation
jfong-ld
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Related issues
Closes https://launchdarkly.atlassian.net/browse/REL-13522
Describe the solution you've provided
Query parameter formatting improvements:
resources.goso 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:
TestKebabCaseQueryParamConversioninresource_cmds_test.goto verify that kebab-case flags are converted to camelCase query parameters and that the kebab-case version is not present in the query.Note
Medium Risk
Changes how all
resourcescommands 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
resourcescommands. Query params are now sent as lower camelCase (e.g.withBranches) rather than the kebab-case flag name.Adds a regression test (
TestKebabCaseQueryParamConversion) that runscode-refs list-repositories --with-branches trueagainst a mock client and asserts the outgoing query useswithBranchesand does not includewith-branches.Reviewed by Cursor Bugbot for commit f0d1199. Bugbot is set up for automated code reviews on this repo. Configure here.