Dockerfile: Use upstream go-swagger #47827
Draft
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.
- What I did
Replaced an outdated fork of
go-swagger
(based on some version from 2016) with a recent upstream version.The recent version fixes the lack of
omitempty
for thex-nullable
fields (see #47526 (comment)).However, there's one catch...
Old version did have a
--skip-validator
switch which turned off generation of theValidate
method for the generated models. It has been removed somewhere around 2018 and is no longer available in the recent version.While not harmful, we don't make any use of these validators, so they're only bloating our api definitions and requiring more dependencies in our api package:
Restoring this option is pretty straightforward, as the generator backend already has an option for that.
See: vvoland/go-swagger@0448fe8
If we want to skip generating these, we should:
- How to verify it
CI
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)