You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current go-swagger version, we have to modify 'configure_xxx.go' file and hard code to register the middleware with function setupMiddlewares or setupGlobalMiddleware. Although it won't get overridden with subsequent generations.
With @casualjim said: The main thing for this being inert is that it's been like this from the start, and introducing a change that can break codebases is something I want to avoid because we have so many consumers
Maybe there should be one Default config make keep the current private function. And we could add something like a global variable for outer users to modify and register middlewares , in which situation we regard the generated server codes as SDK and would not ever to modify it.
The text was updated successfully, but these errors were encountered:
Icarus9913
changed the title
New feature to use middlewares in go-swagger more flexible.
[Feature] New feature to use middlewares in go-swagger more flexible.
Apr 13, 2022
In the current go-swagger version, we have to modify 'configure_xxx.go' file and hard code to register the middleware with function
setupMiddlewares
orsetupGlobalMiddleware
. Although it won't get overridden with subsequent generations.With @casualjim said:
The main thing for this being inert is that it's been like this from the start, and introducing a change that can break codebases is something I want to avoid because we have so many consumers
Maybe there should be one Default config make keep the current private function. And we could add something like a global variable for outer users to modify and register middlewares , in which situation we regard the generated server codes as SDK and would not ever to modify it.
The text was updated successfully, but these errors were encountered: