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

Expose additional context #1620

Merged
merged 7 commits into from
Jan 13, 2023
Merged

Expose additional context #1620

merged 7 commits into from
Jan 13, 2023

Conversation

RobbeSneyders
Copy link
Member

@RobbeSneyders RobbeSneyders commented Jan 9, 2023

This PR contains 2 main changes:

  • Expose additional context. We now expose the scope, operation, connexion context, and receive channel as context aware globals. This makes them available to the decorators independent of the framework in between. The user will also be able to use these.
    I also implemented a TestContext class which can be used to populate the context during testing. It's minimal, but can be extended towards the future.
  • Rename the decorators to be framework specific. This is part of a bigger change for which I'll submit a follow up PR. I was working on this first when it became clear that the context would need to be extended, which is why this is already included.

@RobbeSneyders RobbeSneyders added this to the Connexion 3.0 milestone Jan 9, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3876472127

  • 137 of 154 (88.96%) changed or added relevant lines in 11 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.1%) to 90.629%

Changes Missing Coverage Covered Lines Changed/Added Lines %
connexion/apps/async_app.py 1 2 50.0%
connexion/decorators/response.py 6 7 85.71%
connexion/testing.py 40 43 93.02%
connexion/lifecycle.py 9 14 64.29%
connexion/decorators/main.py 24 31 77.42%
Files with Coverage Reduction New Missed Lines %
connexion/decorators/main.py 1 72.9%
connexion/lifecycle.py 5 71.79%
Totals Coverage Status
Change from base Build 3876399595: -0.1%
Covered Lines: 3143
Relevant Lines: 3468

💛 - Coveralls

@RobbeSneyders RobbeSneyders merged commit 2bf18f6 into main Jan 13, 2023
@RobbeSneyders RobbeSneyders deleted the feature/context branch January 13, 2023 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants