Add routing middleware (#1497)

* Add routing middleware

Factor out starlette BaseHTTPMiddleware

Fix exceptions for starlette < 0.19

Fix docstring formatting

Rename middleware/base.py to abstract.py

Rework routing middleware

* Clean up abstract API docstrings

* Move connexion context into extensions

* Allow empty middleware list
This commit is contained in:
Robbe Sneyders
2022-04-19 22:55:20 +02:00
committed by GitHub
parent 7f2931037e
commit 84e33e5897
16 changed files with 406 additions and 136 deletions

View File

@@ -27,7 +27,6 @@ def test_errors(problem_app):
error405 = json.loads(get_greeting.data.decode('utf-8', 'replace'))
assert error405['type'] == 'about:blank'
assert error405['title'] == 'Method Not Allowed'
assert error405['detail'] == 'The method is not allowed for the requested URL.'
assert error405['status'] == 405
assert 'instance' not in error405