-
Notifications
You must be signed in to change notification settings - Fork 271
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
=======================================
Coverage 94.11% 94.11%
=======================================
Files 1 1
Lines 34 34
=======================================
Hits 32 32
Misses 1 1
Partials 1 1
Continue to review full report at Codecov.
|
please DONOT merge, I will add testings. |
Destructive change, is it okay? |
// WrapHandler wraps `http.Handler` into `gin.HandlerFunc`. | ||
func WrapHandler(h *webdav.Handler) gin.HandlerFunc { | ||
func WrapHandler(config *Config, h *webdav.Handler) gin.HandlerFunc { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
) .
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
now URL variable can be set.
address swaggo/swag#194