Commit Graph

12 Commits

Author SHA1 Message Date
Robbe Sneyders
84e33e5897 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
2022-04-19 22:55:20 +02:00
Robbe Sneyders
895d3d475a Add empty connexion middleware (#1502)
* Add empty connexion middleware

* Address PR comments

* Bump minimum Flask version to 2

* Update tests for changed werkzeug behavior in 2.1

https://github.com/pallets/werkzeug/issues/2352
2022-03-31 19:24:44 +02:00
Parth Shah
fc6803bc00 improved error 415 (#1185)
* improved error 415

* test added

* Fix tests for updated 415 error response

Co-authored-by: unknown <parthsujalshah@gmail.com.com>
Co-authored-by: Ruwan <ruwanlambrichts@gmail.com>
2021-11-04 20:51:16 +01:00
João Santos
1bda0659d5 Fix broken tests (#933)
* Remove extra space in error.

* Fix tests due to new behaviour of external dependencies
2019-05-05 19:38:42 +02:00
Rafael Carício
1858c9d4a0 Flask required only if necessary (#424)
* Example with Flask support

* Only show import error when trying to use Flask

* Re-organize imports

* Move flask_utils next to related module

* Code style

* Change back to incentivizes

* Includes Flask by default

* Project clean up

* Update Rafael Caricio's e-mail address

* Fix conflicts
2017-04-04 20:48:08 +02:00
Diogo
5857dd237f Uncouple all flask functions from base code.
removed test_decorators and test_parameter (this test is useless now);
removed the request/response containers and add new request response classes;
created a abstract api class and a api flask class;
derived classes will implements the get_response/get_request methods that will convert framework req/resp types to connexion req/resp types;
moved the jsonifier from produces to flask api;
created a abstract app class and a app flask class;
changed all validators to use the ConnexionRequest instead flask request;
changed the problem function to generate a ConnexionRequest;
created a new user variables container called context (this is a property of ConnexionRequest). this will be passed as kwargs to all operations functions;
this context is used on authentication;
fixed all tests to new API;
some changes that I did may not be documented in this commit.
2017-04-04 08:20:24 -03:00
Leena Bhegade
f7b3d9a0bb add parameter to decode 2017-02-08 23:48:04 +00:00
Rafael Caricio
bce907f724 Problem as exceptions should convert properly to problem responses 2017-01-11 12:16:08 +01:00
Rafael Caricio
e2b2a7cb5d #239 Fix to support new version of Flask 0.11 2016-06-03 13:24:26 +02:00
Rafael Caricio
e37c994956 Test custom values in problem response 2016-04-08 15:12:54 +02:00
Rafael Caricio
e73a2194d3 Simple test the case of a problematic json 2016-04-08 14:39:06 +02:00
Rafael Caricio
a7aec5d53c Split tests in isolated modules 2016-02-25 14:49:19 +01:00