Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow multiple Swagger documents (no breaking changes), requires http… #168

Merged
merged 5 commits into from
Nov 4, 2021

Conversation

h44z
Copy link
Contributor

@h44z h44z commented Oct 11, 2021

Describe the PR
Allow the registration of multiple Swagger documents with different names.
This PR does not contain any breaking changes as the method signature change is backwards compatible.
It basically solves the problems listed in #885.

Relation issue
swaggo/swag#1022

Additional context
This PR requires swaggo/swag#1022 in Order to compile correctly!

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

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

Please update the README.md . We forgot to do this on swag.

@h44z
Copy link
Contributor Author

h44z commented Oct 11, 2021

Please update the README.md . We forgot to do this on swag.

Yes you are right.

And I think we then need to tag swag in order to update the dependency in go.mod. Currently gin-swagger requires
github.com/swaggo/swag v1.5.1
which does not include the new method signature of swag.ReadDoc.

@ubogdan
Copy link
Contributor

ubogdan commented Oct 12, 2021

We plan to release a new version of swag in the next two weeks. So I guess this PR will have to stay on hold until then.

@h44z
Copy link
Contributor Author

h44z commented Oct 12, 2021

Okay

@h44z
Copy link
Contributor Author

h44z commented Nov 4, 2021

@ubogdan I have update the dependencies of gin-swagger, so this PR is now functional =)

@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #168 (858d7e6) into master (498deb2) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #168   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           81        87    +6     
=========================================
+ Hits            81        87    +6     
Impacted Files Coverage Δ
swagger.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 498deb2...858d7e6. Read the comment docs.

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

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

LGTM

@ubogdan ubogdan merged commit 8ae7504 into swaggo:master Nov 4, 2021
@ubogdan
Copy link
Contributor

ubogdan commented Nov 4, 2021

@h44z Thanks for your contribution

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.

2 participants