Skip to content

build(deps): bump github.com/swaggo/swag to v2#319

Open
rmontagnin wants to merge 1 commit intoswaggo:masterfrom
rmontagnin:master
Open

build(deps): bump github.com/swaggo/swag to v2#319
rmontagnin wants to merge 1 commit intoswaggo:masterfrom
rmontagnin:master

Conversation

@rmontagnin
Copy link
Copy Markdown

Describe the PR
Bumps the swaggo/swag dependency to v2, allowing to properly generate and render Open API v3.x specifications.

Additional context
Currently the this library does not support generating and visualizing Open API v3.x specifications. Since this has been out for quite some time, I think it's time to fix this.

There is another related PR that also has to be merged for this to work properly: swaggo/files#28. This will introduce the ability to render an OpenAPI v3.x documentation without breaking any backward compatibility.

@ctm8788
Copy link
Copy Markdown

ctm8788 commented May 21, 2025

Can this be merged? It would be great to have Open API v3.x support

@titouanj
Copy link
Copy Markdown

Hello, I really need this feature to be merged. I guess @ubogdan is the reviewer we need?

@mcooper-pb
Copy link
Copy Markdown

I haven't ever run a branched package like this, can we get a beta version of this deployed and I would be happy to test it out.

@SebastianOsuna
Copy link
Copy Markdown

+1

@OlenEnkeli
Copy link
Copy Markdown

It is also critically important for me to see this PR to be merged. Ping @ubogdan @easonlin404

@ubogdan
Copy link
Copy Markdown
Contributor

ubogdan commented Apr 10, 2026

is branch has conflicts that must be resolved
Use the web editor or the command line to resolve conflicts before continuing.

go.mod
go.sum

"info": {"contact":{"email":"support@swagger.io","name":"API Support","url":"http://www.swagger.io/support"},"description":"This is a sample server Petstore server.","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"termsOfService":"http://swagger.io/terms/","title":"Swagger Example API","version":"1.0"},
"externalDocs": {"description":"","url":""},
"paths": {"/testapi/get-string-by-int/{some_id}":{"get":{"description":"get string by ID","parameters":[{"description":"Some ID","in":"path","name":"some_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"ok"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.APIError"}}},"description":"We need ID!!"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.APIError"}}},"description":"Can not find ID"}},"summary":"Add a new pet to the store"}},"/testapi/get-struct-array-by-string/{some_id}":{"get":{"description":"get struct array by ID","parameters":[{"description":"Some ID","in":"path","name":"some_id","required":true,"schema":{"type":"string"}},{"description":"Offset","in":"query","name":"offset","required":true,"schema":{"type":"integer"}},{"description":"Limit","in":"query","name":"limit","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"ok"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.APIError"}}},"description":"We need ID!!"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.APIError"}}},"description":"Can not find ID"}}}}},
"openapi": "3.1.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretify the json so we will be able to see the diff.

@ubogdan
Copy link
Copy Markdown
Contributor

ubogdan commented Apr 10, 2026

I wonder how it won't introduce any breaking change if the user generated the docs with
github.com/swaggo/swag v1 and your import is for github.com/swaggo/swag v2 ?
In order to be review-ed , i need you to leave the original example with v1 and create a new one with v2 and tests to pass .

@daskodex
Copy link
Copy Markdown

+1

@OlenEnkeli
Copy link
Copy Markdown

I wonder how it won't introduce any breaking change if the user generated the docs with github.com/swaggo/swag v1 and your import is for github.com/swaggo/swag v2 ? In order to be review-ed , i need you to leave the original example with v1 and create a new one with v2 and tests to pass .

rmontagnin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants