@@ -1983,6 +1983,36 @@ def register_resolver(func: Callable):
1983
1983
def resolve (self , event , context ) -> Dict [str , Any ]:
1984
1984
"""Resolves the response based on the provide event and decorator routes
1985
1985
1986
+ ## Internals
1987
+
1988
+ Request processing chain is triggered by a Route object being called _(`_call_route` -> `__call__`)_:
1989
+
1990
+ 1. **When a route is matched**
1991
+ 1.1. Exception handlers _(if any exception bubbled up and caught)_
1992
+ 1.2. Global middlewares _(before, and after on the way back)_
1993
+ 1.3. Path level middleware _(before, and after on the way back)_
1994
+ 1.4. Middleware adapter to ensure Response is homogenous (_registered_api_adapter)
1995
+ 1.5. Run actual route
1996
+ 2. **When a route is NOT matched**
1997
+ 2.1. Exception handlers _(if any exception bubbled up and caught)_
1998
+ 2.2. Global middlewares _(before, and after on the way back)_
1999
+ 2.3. Path level middleware _(before, and after on the way back)_
2000
+ 2.4. Middleware adapter to ensure Response is homogenous (_registered_api_adapter)
2001
+ 2.5. Run 404 route handler
2002
+ 3. **When a route is a pre-flight CORS (often not matched)**
2003
+ 3.1. Exception handlers _(if any exception bubbled up and caught)_
2004
+ 3.2. Global middlewares _(before, and after on the way back)_
2005
+ 3.3. Path level middleware _(before, and after on the way back)_
2006
+ 3.4. Middleware adapter to ensure Response is homogenous (_registered_api_adapter)
2007
+ 3.5. Return 204 with appropriate CORS headers
2008
+ 4. **When a route is matched with Data Validation enabled**
2009
+ 4.1. Exception handlers _(if any exception bubbled up and caught)_
2010
+ 4.2. Data Validation middleware _(before, and after on the way back)_
2011
+ 4.3. Global middlewares _(before, and after on the way back)_
2012
+ 4.4. Path level middleware _(before, and after on the way back)_
2013
+ 4.5. Middleware adapter to ensure Response is homogenous (_registered_api_adapter)
2014
+ 4.6. Run actual route
2015
+
1986
2016
Parameters
1987
2017
----------
1988
2018
event: Dict[str, Any]
0 commit comments