Adopt fiber middleware template for updated GetReqHeaders() method signature#1419
Merged
mromaszewicz merged 6 commits intooapi-codegen:mainfrom Feb 10, 2026
Merged
Conversation
- 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)
ITheCorgi
approved these changes
Mar 28, 2024
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.
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.
mromaszewicz
approved these changes
Feb 10, 2026
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>
This was referenced Feb 10, 2026
Closed
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>
jamietanna
reviewed
Feb 10, 2026
Member
There was a problem hiding this comment.
@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
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.
Fixes #1341