Skip to content

Adopt fiber middleware template for updated GetReqHeaders() method signature#1419

Merged
mromaszewicz merged 6 commits intooapi-codegen:mainfrom
getBolted:fix/fiber-2.50.0-headers-fix
Feb 10, 2026
Merged

Adopt fiber middleware template for updated GetReqHeaders() method signature#1419
mromaszewicz merged 6 commits intooapi-codegen:mainfrom
getBolted:fix/fiber-2.50.0-headers-fix

Conversation

@getBolted
Copy link
Copy Markdown
Contributor

Fixes #1341

- Bump fiber version to 2.52.0
- Adopted middleware template for fiber to handle new GetReqHeader() method, that has changed signature in fiber 2.50.0 (https://github.com/gofiber/fiber/releases/tag/v2.50.0)
The latest Fiber requires Go 1.24, therefore, we have to increase
the version in the modules which use it. This is constrained to
tests and examples, so it doesn't affect the main repo.

Go 1.24 can't compile the version of golang.org/x/tools which we
were using, so update that as well.
@mromaszewicz mromaszewicz requested a review from a team as a code owner February 10, 2026 14:51
mromaszewicz and others added 3 commits February 10, 2026 08:41
The merge with upstream/main resolved a conflict in the fiber
middleware template's header IsPassThrough handler by taking
upstream's version, which still used the old single-string `value`
variable. This is incorrect because fiber 2.50.0+ changed
GetReqHeaders() to return map[string][]string. Fix by using
valueList[0] to match the rest of the header handling block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This seems to be about the minimal set of changes to have
everything build and test cleanly.
The internal/test and examples modules now require Go 1.24+ in their
go.mod files, but their Makefiles lacked version guards, causing CI
failures on Go 1.22 and 1.23. Add execute-if-go-124 guards matching
the pattern used by other Go 1.24+ modules. Also bump the
strict-server/stdhttp Makefile guard from 1.22 to 1.24.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mromaszewicz mromaszewicz merged commit 5f38641 into oapi-codegen:main Feb 10, 2026
31 checks passed
szarowski pushed a commit to szarowski/oapi-codegen that referenced this pull request Feb 10, 2026
…gnature (oapi-codegen#1419)

* hotfix:
- Bump fiber version to 2.52.0
- Adopted middleware template for fiber to handle new GetReqHeader() method, that has changed signature in fiber 2.50.0 (https://github.com/gofiber/fiber/releases/tag/v2.50.0)

* Use latest fiber, and fix go deps

The latest Fiber requires Go 1.24, therefore, we have to increase
the version in the modules which use it. This is constrained to
tests and examples, so it doesn't affect the main repo.

Go 1.24 can't compile the version of golang.org/x/tools which we
were using, so update that as well.

* fix: use valueList[0] for fiber header IsPassThrough case

The merge with upstream/main resolved a conflict in the fiber
middleware template's header IsPassThrough handler by taking
upstream's version, which still used the old single-string `value`
variable. This is incorrect because fiber 2.50.0+ changed
GetReqHeaders() to return map[string][]string. Fix by using
valueList[0] to match the rest of the header handling block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Tidy up modules

This seems to be about the minimal set of changes to have
everything build and test cleanly.

* fix: add Go 1.24 version guards to Makefiles

The internal/test and examples modules now require Go 1.24+ in their
go.mod files, but their Makefiles lacked version guards, causing CI
failures on Go 1.22 and 1.23. Add execute-if-go-124 guards matching
the pattern used by other Go 1.24+ modules. Also bump the
strict-server/stdhttp Makefile guard from 1.22 to 1.24.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Alexey Boltunov <apboltunov@mts.ru>
Co-authored-by: Marcin Romaszewicz <marcinr@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@mromaszewicz can you please revert this change? This means that we'll have our tests and examples not running < Go 1.24, which means we may miss other changes

We should make sure that only the modules that need newer Go versions are guarded appropriately

@jamietanna jamietanna added the enhancement New feature or request label Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when generating a swagger with a header

4 participants