Repository navigation
fix: set a named array query parameter in the generated params test - #90
Merged
Merged
Conversation
ParamSamples skipped an array parameter whose schema is a $ref to a named array, such as Modules, so TestClient_Params never checked that the client sends it. A named slice takes the same composite literal, so sample it like an unnamed one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
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.
ParamSamplesskipped any array query parameter whose schema is a$refto a named array, such as golden'sModulesor ibkr'sOrderFilters. As a result,TestClient_Paramsnever checked that the client actually sends it. Turning ibkr'sfiltersinto a namedOrderFiltersschema made its check disappear from the generated test.A named slice takes the same composite literal as an unnamed one (
Modules{ModuleSummaryDetail}), so it is now sampled the same way. Golden's params test now setsmodulesand checkssummaryDetailon the wire. The float sample moves from 9.5 to 10.5 because it counts the parameter's position.make readypasses.Generated by Claude Code