Bump swaggo/files/v2 to v2.0.2 to render OpenAPI 3.1 specs#148
Open
thdxg wants to merge 1 commit into
Open
Conversation
The pinned files/v2 v2.0.0 bundles an older Swagger UI that cannot render OpenAPI 3.1 specs, so serving a swag/v2-generated 3.1 spec fails with "does not specify a valid version field". files/v2 v2.0.1 upgraded the bundled Swagger UI to v5.17.10 (and v2.0.2 bumps it further), which renders OpenAPI 3.1. Since echo-swagger v2 already produces 3.1 specs via swag/v2, bump the UI dependency so the served UI can render them.
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.
Problem
echo-swaggerv2 generates OpenAPI 3.1 specs (viaswag/v2), but itsgo.modpinsgithub.com/swaggo/files/v2 v2.0.0, which embeds an older Swagger UI build that cannot render OpenAPI 3.1. The result is that the served UI loads but shows:So a
swag/v2+echo-swaggerv2 setup produces a 3.1 spec that the bundled UI refuses to display.Fix
Bump
github.com/swaggo/files/v2fromv2.0.0tov2.0.2.files/v2 v2.0.1upgraded the bundled Swagger UI to v5.17.10, which renders OpenAPI 3.1;v2.0.2bumps it further. This is ago.mod/go.sum-only change.Verification
go build ./...— passesgo test ./...— passes (the existing asset-serving tests stay green)swag/v2-generatedopenapi: 3.1.0spec: withfiles/v2 v2.0.0the UI shows the "valid version field" error; after bumping tov2.0.2(confirmed by asset hash that the new bundle is served) the spec renders correctly.Relates to #113 (request to update the bundled Swagger UI).