* Add test for MethodViewResolver
* Warn about ignoring of collection_endpoint_name in MethodViewResolver
* Add docstring on class_arguments in MethodViewResolver
* Fix for bug of the function is_json_mimetype() (#1114)
* Splitting the mimetype correctly
* Added a test for the json mimetype usecases
* Update connexion/utils.py
Co-authored-by: Ruwann <ruwan.lambrichts@ml6.eu>
* Fix deprecation warning for iter_errors
Bump jsonschema version to at least v4
* Bump jsonschema to v4.0.1
* Provide schema as keyword arg to evolve
* Fix evolve statement
* Fix uri parsing for query parameter with empty brackets (#1501)
* Update tests for changed werkzeug behavior in 2.1 (#1506)
https://github.com/pallets/werkzeug/issues/2352
* Bugfix/async security check (#1512)
* Add failing tests
* Use for else construct
* openapi: remove JSON body second validation and type casting (#1170)
* openapi: remove body preprocessing
Body is already validated using jsonschema. There was also some type
casting but it was wrong: e.g. not recurring deeply into dicts and lists,
relying on existence of "type" in schema (which is not there e.g. if
oneOf is used). Anyway, the only reason why types should be casted is
converting integer values to float if the type is number. But this is in
most cases irrelevant.
Added an example, which did not work before this commit (echoed `{}`)
e.g. for
```
curl localhost:8080/api/foo -H 'content-type: application/json' -d
'{"foo": 1}'
```
but now the example works (echoes `{"foo": 1}`).
* test with oneOf in the requestBody
* remove oneof examples: superseded by tests
Co-authored-by: Pavol Vargovcik <pavol.vargovcik@kiwi.com>
Co-authored-by: Ruwann <ruwanlambrichts@gmail.com>
Co-authored-by: Pavol Vargovčík <pavol.vargovcik@gmail.com>
Co-authored-by: Pavol Vargovcik <pavol.vargovcik@kiwi.com>
* WIP: rework required_scopes checking
* Update tests for security scopes
* Add test for oauth security scheme with multiple possible scopes
* Update security tests
* Change optional auth test to correct behaviour
* Update security documentation
* Remove TODOs
* Catch possible exceptions from failed checks in async security factory
* Add .venv/ to gitignore
* Try to raise most specific exception
* Add test for raising most specific error
* Update async security handler factory
* Fix security handler error catching
* Fix imports order
* ensure view_name is CamelCase
* update tests for MethodViewResolver for CamelCase
* use inflection package to camelize
Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
* Added unit tests to demonstrate the problems of https://github.com/zalando/connexion/issues/975
- Taken mostly from existing PR: https://github.com/zalando/connexion/pull/987
* now splitting out multipart POSTs into files[] and form[], handling duplicate keys as the rest of connexion expects
- Based parly on existing PR: https://github.com/zalando/connexion/pull/987
* rewrote how operations/openapi.py::_get_body_argument() works to better build the arguments[] list according to what the spec says and what the handler accepts. This fixes a bug when requests contain mixed files and form values and the handler is expecting variable names matching the request property names.
* Adding unit tests to improve code converage test
* post merge fixes - using 'async' keyword now in new unit test file
* unit test improvements -- now testing the contents of the files we upload too
* making some code a bit clearer regarding duplicate names of file submissions
* fixing up unit tests since merging main
* fixing isort-check-tests and flake8
* clarified a comment
* comment correction
* after discussions with maintainer, reverted _get_body_argument back to the original where it does not attempt to break out the body into individual arguments for the handler. But left in changes that make the normal behavior of not passing a body argument to a handler without one more consistent when the body itself is empty or not an object type.
* fixing unit tests after after reverting _get_body_argument behavior
* fix-square bracket : V1
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* Fix syntax
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* Add OpenAPI test with square brackets
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* Fix test
Fix alphabetic order in import
Fix test parametrization
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* square bracket : Set collection format to None for OpenAPIURIParser
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
Co-authored-by: Géry THRASIBULE <g.thrasibule@lecomptoirdespharmacies.fr>
* Reload Flask on API file changes
Flask can automatically reload in debug mode whenver specified files
change. By default that includes templates, however changes to the API
files (i.e. openapi.yml) should result in a reload as well.
This PR adds all added API files to be monitored automatically by Flask.
Signed-off-by: Paul Spooren <mail@aparcar.org>
* Take into account specification dir
* Add extra_files argument.
User can still specify custom extra_files in addition to the
swagger specification, so need to account for that in FlaskApp.run().
* Update docstring for flake8
* Add extra_files as explicit argument for FlaskApp
* Add extra_files docstring
Co-authored-by: Ruwan <ruwanlambrichts@gmail.com>