Skip to content

🐛 [Bug]: ctx.Bind().URI() fails to bind parameters with custom params tags #4091

@DarkHeros09

Description

@DarkHeros09

Bug Description

In Fiber v3, the Bind().URI() method fails to populate struct fields when using the params tag, even when the tag name matches the route parameter name exactly. Manual retrieval via ctx.Params() works, suggesting the issue lies specifically within the Binder's reflection logic.

How to Reproduce

Steps to reproduce the behavior:

  1. Define a struct with a params tag.
  2. Define a route with a matching parameter name.
  3. Call ctx.Bind().URI() inside the handler.

Expected Behavior

params.ID should be populated with the value from the URL (e.g., 5).

Fiber Version

V3

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions