Fix step.request_parse wildcard path parameter extraction ({param...})#230
Merged
Fix step.request_parse wildcard path parameter extraction ({param...})#230
Conversation
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix step.request_parse for wildcard path parameters
Fix step.request_parse wildcard path parameter extraction ({param...})
Mar 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes step.request_parse so it correctly extracts Go 1.22+ wildcard path parameters ({param...}) by stripping the ... suffix from the parameter name and capturing the full remaining path instead of a single segment.
Changes:
- Update wildcard path param extraction to (1) normalize param names by trimming
...and (2) join remaining path segments for wildcard matches. - Add unit tests covering wildcard capture for both multi-segment and single-segment paths.
- Update indirect dependencies in
example/module files (go.mod/go.sum).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| module/pipeline_step_request_parse.go | Fix wildcard {param...} extraction by trimming suffix and joining remaining segments. |
| module/pipeline_step_request_parse_test.go | Add coverage for wildcard params capturing multiple vs. single segments. |
| example/go.mod | Indirect dependency version updates/removals in the example module. |
| example/go.sum | Corresponding go.sum churn for the example module dependency changes. |
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.
step.request_parsefailed to extract wildcard path parameters ({param...}) introduced in Go 1.22+: the...suffix was retained in the param name (causing lookup misses), and only the first path segment was captured instead of the full remainder.Changes
module/pipeline_step_request_parse.go: In the pattern-matching loop, detect...suffix on param names, strip it, and join all remaining path segments (actualParts[i:]) for wildcard params instead of capturing a single segment.module/pipeline_step_request_parse_test.go: Added tests for multi-segment (/api/forms/test-form→resource = "forms/test-form") and single-segment (/api/forms→resource = "forms") wildcard capture.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.