You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For 1., we should be able to switch to use upstream/latest. However, for 2., things are more "complicated"; our code depends on a feature in go-swagger (see go-swagger/go-swagger#676, go-swagger/go-swagger#680) that was removed (or refactored/changed) go-swagger/go-swagger#2077. For our purpose we only want to generate some types from the Swagger file, and not generate other code (i.e., we don't want it to generate a full client);
Given that the feature was removed (or at least, no longer works with how we call it), we are currently not able to update go-swagger (for 2.). Unfortunately, the version we rely on has some issues;
compatibility with recent go versions broke (forcing us to use a fork of go-swagger, in which we maintain patches)
the version we use has a bug; when generating types, the order in which fields end up in the generated code is randomized (due to some code in go-swagger iterates over map[string] which (by design) is randomized by golang). This causes CI to be "flaky" (swagger validation randomly failing if changes are made to the swagger file).
In short, we should: remove use of our go-swagger fork, so that we can consume fixes and features from newer versions in upstream.
As a short term solution for 1., we could "split" the use; use upstream go-swagger for validating against the spec, and our fork only for generating.
Alternatively, use go-swaggger only for validating, and replace the "generator" code with an alternative implementation; work on that was started in Replace go-swagger with swagger-gen #36714, but there were some issues with that PR (plus it required us to maintain our own generator code, which wasn't ideal either).
related to #36714
We currently use go-swagger for two purposes:
For
1., we should be able to switch to use upstream/latest. However, for2., things are more "complicated"; our code depends on a feature in go-swagger (see go-swagger/go-swagger#676, go-swagger/go-swagger#680) that was removed (or refactored/changed) go-swagger/go-swagger#2077. For our purpose we only want to generate some types from the Swagger file, and not generate other code (i.e., we don't want it to generate a full client);Given that the feature was removed (or at least, no longer works with how we call it), we are currently not able to update go-swagger (for
2.). Unfortunately, the version we rely on has some issues;map[string]which (by design) is randomized by golang). This causes CI to be "flaky" (swagger validation randomly failing if changes are made to the swagger file).In short, we should: remove use of our go-swagger fork, so that we can consume fixes and features from newer versions in upstream.
1., we could "split" the use; use upstream go-swagger for validating against the spec, and our fork only for generating.