-
-
Notifications
You must be signed in to change notification settings - Fork 761
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
[Connexion 3.0.0 config] Migration from flask.current_app.config #1804
Comments
Did you get a resolution on this question? I was wondering the same thing |
@Parthib We used "from connexion.context import scope" and implemented our own interface for managing things inside this virtual context so it would be easier to switch in the future if any breaking updates like this one as we had to refactor a lot of things. |
Facing the exact same problem. Would you mind expanding on the solution you came up with @vladislavkoz? Or, ideally, would you share it? Maybe it's something that could be worth including in the Connexion 3 cookbook (documentation is really a bit lacking at this point). I guess using |
Well, I guess I was hoping that you would share your Middleware class (or a reduced version focusing just on the use case that this issue is about, i.e., making config parameters available in application/runtime context), because l, given the current sparsity of the Connexion documentation in terms of concrete examples and the huge conceptual and technical differences between v2 and v3, it's not exactly trivial. Fine if you can't or don't want to, of course, whatever the reason. But if you can, I think it would be useful for a lot of Connexion users, and it could form a basis for a potential new default middleware or an addition to the cookbook. |
@uniqueg
|
BTW, there is also available from connexion import request as connexion_request |
Thanks a lot @vladislavkoz, I find this very useful. Will probably try to make this into a middleware and add it before exception handling. If so, I'll post here what I did. |
With connexion 2 it was pretty easy to configure some variables that can be accessed from any place in the app.
We were able to pass these variables to the flask config and then do:
"config contains everything what we need"
How we can achieve the same using the connexion 3?
The text was updated successfully, but these errors were encountered: