mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-06 04:19:26 +00:00
Make middleware_app property private (#1737)
So it doesn't show up in documentation.
This commit is contained in:
@@ -15,4 +15,4 @@ build:
|
|||||||
- poetry config virtualenvs.create false
|
- poetry config virtualenvs.create false
|
||||||
post_install:
|
post_install:
|
||||||
# Install dependencies with 'docs' dependency group
|
# Install dependencies with 'docs' dependency group
|
||||||
- poetry install --with docs
|
- poetry install --with docs --all-extras
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class AbstractApp:
|
|||||||
interface, it delegates most of the work to the middleware and framework application.
|
interface, it delegates most of the work to the middleware and framework application.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
middleware_app: SpecMiddleware
|
_middleware_app: SpecMiddleware
|
||||||
"""
|
"""
|
||||||
The application wrapped by the ConnexionMiddleware, which in its turn wraps the framework
|
The application wrapped by the ConnexionMiddleware, which in its turn wraps the framework
|
||||||
application.
|
application.
|
||||||
@@ -83,7 +83,7 @@ class AbstractApp:
|
|||||||
:obj:`security.SECURITY_HANDLERS`
|
:obj:`security.SECURITY_HANDLERS`
|
||||||
"""
|
"""
|
||||||
self.middleware = ConnexionMiddleware(
|
self.middleware = ConnexionMiddleware(
|
||||||
self.middleware_app,
|
self._middleware_app,
|
||||||
import_name=import_name,
|
import_name=import_name,
|
||||||
lifespan=lifespan,
|
lifespan=lifespan,
|
||||||
middlewares=middlewares,
|
middlewares=middlewares,
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ class AsyncApp(AbstractApp):
|
|||||||
:param security_map: A dictionary of security handlers to use. Defaults to
|
:param security_map: A dictionary of security handlers to use. Defaults to
|
||||||
:obj:`security.SECURITY_HANDLERS`
|
:obj:`security.SECURITY_HANDLERS`
|
||||||
"""
|
"""
|
||||||
self.middleware_app: AsyncMiddlewareApp = AsyncMiddlewareApp()
|
self._middleware_app: AsyncMiddlewareApp = AsyncMiddlewareApp()
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
import_name,
|
import_name,
|
||||||
@@ -195,7 +195,7 @@ class AsyncApp(AbstractApp):
|
|||||||
def add_url_rule(
|
def add_url_rule(
|
||||||
self, rule, endpoint: str = None, view_func: t.Callable = None, **options
|
self, rule, endpoint: str = None, view_func: t.Callable = None, **options
|
||||||
):
|
):
|
||||||
self.middleware_app.add_url_rule(
|
self._middleware_app.add_url_rule(
|
||||||
rule, endpoint=endpoint, view_func=view_func, **options
|
rule, endpoint=endpoint, view_func=view_func, **options
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ class FlaskMiddlewareApp(SpecMiddleware):
|
|||||||
class FlaskApp(AbstractApp):
|
class FlaskApp(AbstractApp):
|
||||||
"""Connexion Application based on ConnexionMiddleware wrapping a Flask application."""
|
"""Connexion Application based on ConnexionMiddleware wrapping a Flask application."""
|
||||||
|
|
||||||
middleware_app: FlaskMiddlewareApp
|
_middleware_app: FlaskMiddlewareApp
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@@ -231,8 +231,8 @@ class FlaskApp(AbstractApp):
|
|||||||
:param security_map: A dictionary of security handlers to use. Defaults to
|
:param security_map: A dictionary of security handlers to use. Defaults to
|
||||||
:obj:`security.SECURITY_HANDLERS`
|
:obj:`security.SECURITY_HANDLERS`
|
||||||
"""
|
"""
|
||||||
self.middleware_app = FlaskMiddlewareApp(import_name, server_args or {})
|
self._middleware_app = FlaskMiddlewareApp(import_name, server_args or {})
|
||||||
self.app = self.middleware_app.app
|
self.app = self._middleware_app.app
|
||||||
super().__init__(
|
super().__init__(
|
||||||
import_name,
|
import_name,
|
||||||
lifespan=lifespan,
|
lifespan=lifespan,
|
||||||
@@ -255,7 +255,7 @@ class FlaskApp(AbstractApp):
|
|||||||
def add_url_rule(
|
def add_url_rule(
|
||||||
self, rule, endpoint: str = None, view_func: t.Callable = None, **options
|
self, rule, endpoint: str = None, view_func: t.Callable = None, **options
|
||||||
):
|
):
|
||||||
self.middleware_app.add_url_rule(
|
self._middleware_app.add_url_rule(
|
||||||
rule, endpoint=endpoint, view_func=view_func, **options
|
rule, endpoint=endpoint, view_func=view_func, **options
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user