Removed internal variable pass_context_arg_name
Fixes #1532 .
Changes proposed in this pull request:
- I removed the parameter pass_context_arg_name passed internally as asked from the various constructors, and left in the SecurityHandlerFactory a constant called context_kw, following the same pattern of required_scopes_kw.
I don't know if it is better to put in uppercase both values (context_kw and required_scopes_kw), now they are constants in the end.
I left as the other one to have consistency, but if you prefer I can change them both.
Thanks @leonardofesta! Could you update the failing tests to make them pass?
Hi @leonardofesta, did you have a chance to have another look at this? Let me know if you need support.
Sorry @RobbeSneyders I was on vacation and I didn't saw the emails. Now it should pass all tests.
Should i rebase and force push?
Pull Request Test Coverage Report for Build 3108587472
- 7 of 9 (77.78%) changed or added relevant lines in 3 files are covered.
- 43 unchanged lines in 10 files lost coverage.
- Overall coverage increased (+0.09%) to 94.749%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| connexion/security/security_handler_factory.py | 2 | 4 | 50.0% |
| <!-- | Total: | 7 | 9 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| connexion/apps/flask_app.py | 1 | 95.24% |
| connexion/jsonifier.py | 1 | 92.86% |
| connexion/middleware/main.py | 1 | 96.43% |
| connexion/middleware/routing.py | 1 | 96.08% |
| connexion/operations/openapi.py | 1 | 95.21% |
| connexion/json_schema.py | 2 | 85.57% |
| connexion/middleware/swagger_ui.py | 3 | 95.18% |
| connexion/decorators/validation.py | 5 | 96.41% |
| connexion/apis/abstract.py | 11 | 90.48% |
| connexion/middleware/security.py | 17 | 83.66% |
| <!-- | Total: | 43 |
| Totals | |
|---|---|
| Change from base Build 2910344107: | 0.09% |
| Covered Lines: | 2851 |
| Relevant Lines: | 3009 |
💛 - Coveralls
Any update @leonardofesta?
Any update @leonardofesta? I just pushed the update, I hope I understood correctly. I'm using context_ as suggested as value, in both cases used as constant.
- I basically restored the decorator functionality by using a boolean with default == False to maintain the same logic
- In the security handler part, please recheck but now it should be correct
Let me know
Thanks @leonardofesta, looks good to me.
I pushed a change to the test, as it wasn't actually testing the new behavior.