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

feat: support swagger configuration #46

Merged
merged 3 commits into from
Mar 23, 2019

Conversation

easonlin404
Copy link
Member

@easonlin404 easonlin404 commented Mar 22, 2019

now URL variable can be set.

address swaggo/swag#194

@codecov-io
Copy link

codecov-io commented Mar 22, 2019

Codecov Report

Merging #46 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #46   +/-   ##
=======================================
  Coverage   94.11%   94.11%           
=======================================
  Files           1        1           
  Lines          34       34           
=======================================
  Hits           32       32           
  Misses          1        1           
  Partials        1        1
Impacted Files Coverage Δ
swagger.go 94.11% <100%> (ø) ⬆️

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 ea4ea9d...efb67c3. Read the comment docs.

@easonlin404 easonlin404 changed the title feat: support swagger configuration [WIP] feat: support swagger configuration Mar 22, 2019
@easonlin404
Copy link
Member Author

please DONOT merge, I will add testings.

@easonlin404 easonlin404 changed the title [WIP] feat: support swagger configuration feat: support swagger configuration Mar 23, 2019
@easonlin404 easonlin404 self-assigned this Mar 23, 2019
@easonlin404 easonlin404 merged commit 8148451 into master Mar 23, 2019
@easonlin404 easonlin404 deleted the support-config-api-definition branch March 23, 2019 09:04
@pei0804
Copy link
Member

pei0804 commented Mar 23, 2019

Destructive change, is it okay?
https://travis-ci.org/swaggo/swag/jobs/510253209

@pei0804
Copy link
Member

pei0804 commented Mar 23, 2019

@easonlin404

// WrapHandler wraps `http.Handler` into `gin.HandlerFunc`.
func WrapHandler(h *webdav.Handler) gin.HandlerFunc {
func WrapHandler(config *Config, h *webdav.Handler) gin.HandlerFunc {
Copy link
Member

Choose a reason for hiding this comment

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

It seems safer to prepare another function.

Copy link
Member

Choose a reason for hiding this comment

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

I think feel good is revert and create another function.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am syncing up with swag code. sorry about bother.

Copy link
Member

Choose a reason for hiding this comment

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

I see.
I was concerned about was the impact on users already using WrapHander .
So I think create another interface. eg: config setable and default config (WrapHander) .

Copy link
Member Author

@easonlin404 easonlin404 Mar 23, 2019

Choose a reason for hiding this comment

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

You're right for api backward compatibility. could you help add this feat?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

OK I do it.
Before that, I would like to revert this PR once to minimize the impact.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

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.

3 participants