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

Add support to specify multiple routes for the same function #957

Merged
merged 1 commit into from
Jul 31, 2021

Conversation

pc-coder
Copy link
Contributor

Describe the PR
Add support to specify multiple routes for the same function

Relation issue
#460

Additional context
In the case of multiple @router comments, swagger creates routes using information only from the last comment.
This change would help us add swagger routes for each comment.

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.

Except for the 2 comments left LTGTM.

operation.go Outdated Show resolved Hide resolved
operation.go Outdated Show resolved Hide resolved
ubogdan
ubogdan previously approved these changes Jul 27, 2021
@ubogdan
Copy link
Contributor

ubogdan commented Jul 27, 2021

Before we merge this into master we need to document the feature in README.md so all our users will be aware of it.

@codecov
Copy link

codecov bot commented Jul 31, 2021

Codecov Report

Merging #957 (44c13c7) into master (17c1766) will increase coverage by 1.20%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #957      +/-   ##
==========================================
+ Coverage   84.83%   86.04%   +1.20%     
==========================================
  Files           8        8              
  Lines        1649     1835     +186     
==========================================
+ Hits         1399     1579     +180     
- Misses        145      150       +5     
- Partials      105      106       +1     
Impacted Files Coverage Δ
operation.go 88.73% <100.00%> (+1.07%) ⬆️
parser.go 83.31% <100.00%> (+1.30%) ⬆️
types.go 100.00% <0.00%> (ø)
swagger.go 100.00% <0.00%> (ø)
schema.go 98.88% <0.00%> (+0.17%) ⬆️
gen/gen.go 95.52% <0.00%> (+0.24%) ⬆️
packages.go 73.33% <0.00%> (+2.85%) ⬆️
debug.go 50.00% <0.00%> (+30.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 17c1766...44c13c7. Read the comment docs.

@pc-coder
Copy link
Contributor Author

Before we merge this into master we need to document the feature in README.md so all our users will be aware of it.

Have updated the readme with an example.

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 60ec167 into swaggo:master Jul 31, 2021
@ubogdan
Copy link
Contributor

ubogdan commented Jul 31, 2021

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