Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/codegen/templates/fiber/fiber-middleware.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (siw *ServerInterfaceWrapper) {{$opid}}(c *fiber.Ctx) error {
if cookie != "" {

{{- if .IsPassThrough}}
params.{{.GoName}} = {{if .HasOptionalPointer}}}&{{end}}cookie
params.{{.GoName}} = {{if .HasOptionalPointer}}&{{end}}cookie

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Missing regression test for the fixed path

The PR description acknowledges that no fixture exercises an optional pass-through cookie parameter in the fiber backend, which is exactly why the bug went unnoticed. The fix prevents a future regression, but without a test the same path can silently break again.

Per the project's test placement guidelines, this belongs in internal/test/parameters/roundtrip/parameters.yaml — the existing /cookie endpoint (line 522) could be extended with an optional content-typed (pass-through) cookie parameter, and the fiber generated file regenerated. A comment like # From issue-NNNN: optional pass-through cookie in fiber emitted extra brace preserves traceability.

Prompt To Fix With AI
This is a comment left during a code review.
Path: pkg/codegen/templates/fiber/fiber-middleware.tmpl
Line: 148

Comment:
**Missing regression test for the fixed path**

The PR description acknowledges that no fixture exercises an optional pass-through cookie parameter in the fiber backend, which is exactly why the bug went unnoticed. The fix prevents a future regression, but without a test the same path can silently break again.

Per the project's test placement guidelines, this belongs in `internal/test/parameters/roundtrip/parameters.yaml` — the existing `/cookie` endpoint (line 522) could be extended with an optional `content`-typed (pass-through) cookie parameter, and the fiber generated file regenerated. A comment like `# From issue-NNNN: optional pass-through cookie in fiber emitted extra brace` preserves traceability.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

{{end}}

{{- if .IsJson}}
Expand Down