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

[Feature] New feature to use middlewares in go-swagger more flexible. #2760

Open
Icarus9913 opened this issue Apr 13, 2022 · 0 comments
Open

Comments

@Icarus9913
Copy link

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.

@Icarus9913 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants