This repository was archived by the owner on Feb 5, 2026. It is now read-only.
Update Go dependancies and fix a bug when walking file responses#31
Merged
seseloos merged 2 commits intoExperienceOne:masterfrom Feb 5, 2026
Merged
Update Go dependancies and fix a bug when walking file responses#31seseloos merged 2 commits intoExperienceOne:masterfrom
seseloos merged 2 commits intoExperienceOne:masterfrom
Conversation
* fix linting issues * fix counting error when iterating responses
seseloos
approved these changes
Feb 5, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
On behalf of the https://github.com/arabesque-sray:
This PR does two things:
Updating go dependancies
A lot of dependancies on this repo are obsolete and contain critical security issues. An example is the dependancy on
golang.org/x/netwhich is totally removed after updating go.mod. This will dismiss #21Fix: Correct Logic for File-Type Response Indexing in Code Generation
Summary
We address a logic bug in the code generation process specifically for handling file responses. The logic flaw was causing a test (
TestDownloadImage) withinupstream/masterto fail. After this fix, it runs successfully.Problem Description
Consider an OpenAPI specifications that returns multiple responses which at least one of them is a file operation:
In this example, two responses are defined:
200, which is of typefile.500, meant for handling errors.Although the
200response is listed first, when using the walkResponses method, it is walked second. This is due towalkResponsesdeliberately processing file-type responses last to accommodate certain code generation requirements, such as addingdefer httpResponse.Body.Close()after generating code for that response.However, the existing client generator incorrectly calculates the response index. In fact the code there effectively counts the number of file-type responses rather than their index.
Solution
Since
walkResponseshas a custom ordrering logic, it's best if the index is passed to the handler function as a parameter, which is the approach for this PR.