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

Extract boilerplate code into Routed base classes #1590

Merged
merged 5 commits into from
Sep 26, 2022

Conversation

RobbeSneyders
Copy link
Member

@RobbeSneyders RobbeSneyders commented Sep 16, 2022

As mentioned in #1588, we're repeating a lot of boilerplate across the middlewares. This PR extracts this boilerplate into shared base classes. Feel free to propose better naming for them 🙂

I had to revert the order of Middleware - Api - Operation to Operation - Api - Middleware due to dependencies in the typing.

@RobbeSneyders RobbeSneyders force-pushed the feature/routed-base-classes branch 2 times, most recently from 9f58c14 to 31f7476 Compare September 16, 2022 20:39
@@ -6,61 +6,36 @@
from starlette.types import ASGIApp, Receive, Scope, Send
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only changed the order in this file.

@@ -21,56 +21,6 @@
_original_scope: ContextVar[Scope] = ContextVar("SCOPE")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only changed the order in this file.

@RobbeSneyders RobbeSneyders force-pushed the feature/routed-base-classes branch 2 times, most recently from 2e89679 to db38292 Compare September 16, 2022 21:41
Base automatically changed from feature/validation-middleware to main September 18, 2022 08:55
@RobbeSneyders RobbeSneyders force-pushed the feature/routed-base-classes branch from db38292 to 24b5725 Compare September 18, 2022 09:10
@coveralls
Copy link

coveralls commented Sep 18, 2022

Pull Request Test Coverage Report for Build 3130067976

  • 144 of 154 (93.51%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 95.243%

Changes Missing Coverage Covered Lines Changed/Added Lines %
connexion/middleware/routing.py 25 27 92.59%
connexion/middleware/abstract.py 64 72 88.89%
Totals Coverage Status
Change from base Build 3129982881: 0.03%
Covered Lines: 2843
Relevant Lines: 2985

💛 - Coveralls

@RobbeSneyders RobbeSneyders added this to the Connexion 3.0 milestone Sep 18, 2022
connexion/middleware/abstract.py Outdated Show resolved Hide resolved
connexion/middleware/security.py Outdated Show resolved Hide resolved
@RobbeSneyders RobbeSneyders merged commit 181c61b into main Sep 26, 2022
@RobbeSneyders RobbeSneyders deleted the feature/routed-base-classes branch September 26, 2022 18:34
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.

3 participants