fix(domain): comma-join repeatable TLD flags before sending as query params (DEVEX-882)#106
Merged
Conversation
…params (DEVEX-882) progenitor's generated client always seq-serializes a Vec query-param setter as repeated key=value pairs, ignoring the OpenAPI spec's `style: form, explode: false` for `tlds`. Multiple --tlds/--tld occurrences on `domain suggest` and `domain agreements` were sent as tlds=com&tlds=net&tlds=io instead of tlds=com,net,io, which the API rejects. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Domains API request formatting for repeatable TLD flags by ensuring tlds is sent as a single comma-joined query parameter (OpenAPI style: form, explode: false), working around progenitor’s current query serialization behavior.
Changes:
- Added
comma_joined()helper to collapse repeatable flag values into a single comma-joined query value. - Applied
comma_joined()todomain suggest --tldsanddomain agreements --tldrequest builders. - Added regression tests (httpmock-based) to assert the wire-level query string format, plus unit tests for
comma_joined().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| rust/src/domain/common.rs | Adds comma_joined() helper and unit tests to enforce correct list-to-query serialization. |
| rust/src/domain/suggest.rs | Uses comma_joined() for tlds and adds a regression test verifying the query param is comma-joined. |
| rust/src/domain/agreements.rs | Uses comma_joined() for tlds and adds a regression test verifying the query param is comma-joined. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lues Address Copilot review feedback on #106: values.join(",") always allocates a new String even for the single-element case. Return the Vec unchanged when there's nothing to join. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
runruh-godaddy
approved these changes
Jul 15, 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.
Summary
gddy domain suggest --tldsandgddy domain agreements --tldsent repeated occurrences as separatetlds=query pairs (tlds=com&tlds=net&tlds=io), which the Domains API rejects (400 MISMATCH_FORMAT).tldsasstyle: form, explode: false(one comma-joined value), but progenitor's generated client always seq-serializesVecquery params as repeated pairs regardless ofexplode— this is a known, acknowledged upstream limitation (see oxidecomputer/progenitor#1017, #724).comma_joined()helper indomain::commonand applied it at both call sites so multiple--tlds/--tldvalues are joined into the single query value the API expects.Test plan
httpmock-based) assert the wire-level query string istlds=com,net,io, not repeated pairs, for bothdomain suggestanddomain agreements.comma_joined(multi-value, single-value, empty).cargo test --workspacepasses.cargo clippy --all-targets -- -D warningsclean.Fixes DEVEX-882.
🤖 Generated with Claude Code