Commit Graph

9 Commits

Author SHA1 Message Date
Daniel Grossmann-Kavanagh
08e4536e5e bump and pin isort, apply all automatic fixes (#903)
Fixes the build.

Changes proposed in this pull request:
 - apply all of the isort changes that resulted from the latest version
 - pin to the latest version (4.3.15) so this doesn't happen again, unless we bump the version on purpose
2019-03-15 13:04:33 +01:00
Roberto Polli
b18d8b9528 Serve yaml spec. (#842)
* Fix: #772. Serving yaml spec.

Serve yaml spec with a yaml prettifier. Uses a separate method for
doing the job and does not modify the openapi_json one.
2019-01-24 08:31:02 +01:00
Diogo Dutra
03a0febbf9 Fixed aiohttp test client deprecation messages. (#810) 2018-12-11 08:50:46 +01:00
João Santos
44ea9336fe Connexion 2.0 (#619)
- App and Api options must be provided through the "options" argument (``old_style_options`` have been removed).
- You must specify a form content-type in 'consumes' in order to consume form data.
- The `Operation` interface has been formalized in the `AbstractOperation` class.
- The `Operation` class has been renamed to `Swagger2Operation`.
- Array parameter deserialization now follows the Swagger 2.0 spec more closely.
  In situations when a query parameter is passed multiple times, and the collectionFormat is either csv or pipes, the right-most value will be used.
  For example, `?q=1,2,3&q=4,5,6` will result in `q = [4, 5, 6]`.
  The old behavior is available by setting the collectionFormat to `multi`, or by importing `decorators.uri_parsing.AlwaysMultiURIParser` and passing `parser_class=AlwaysMultiURIParser` to your Api.
- The spec validator library has changed from `swagger-spec-validator` to `openapi-spec-validator`.
- Errors that previously raised `SwaggerValidationError` now raise the `InvalidSpecification` exception.
  All spec validation errors should be wrapped with `InvalidSpecification`.
- Support for nullable/x-nullable, readOnly and writeOnly/x-writeOnly has been added to the standard json schema validator.
- Custom validators can now be specified on api level (instead of app level).
- Added support for basic authentication and apikey authentication
- If unsupported security requirements are defined or ``x-tokenInfoFunc``/``x-tokenInfoUrl`` is missing, connexion now denies requests instead of allowing access without security-check.
- Accessing ``connexion.request.user`` / ``flask.request.user`` is no longer supported, use ``connexion.context['user']`` instead
2018-11-05 14:50:42 +01:00
Tomasz Trębski
2b6169aade Fix bad parsing of query params for AioHttp (#697)
* Fix bad parsing of query params for AioHttp
2018-09-27 09:04:55 +02:00
Diogo Dutra
b02023ce1c fix on utils.has_coroutine function (#600)
Fixed coroutinefunction verification when has async def.
   It is necessary because there's no @asyncio.coroutine decorator to validate
2018-09-13 11:57:39 +02:00
Stephen Kwong
ee07865b78 Add capability to pass framework's request context to handler functions 2018-07-13 08:41:01 +02:00
Diogo Dutra
8f4ff0313d Changes for aiohttp support:
- Created a metaclass for AbstractAPI (it is used to set the jsonifier for the class);
 - Created a new class method AbstractAPI._set_jsonifier;
 - Changed the code to use the new jsonifier interface;
 - Create a new module called coroutines_wrapper to put the wrapper functions with the 'yield from' statement. It is used to enable frameworks with coroutine handlers;
 - Did the AioHttpApi.get_request coroutine and add req.read() to get the request body;
 - Moved the flask jsonifier to utils and did it a generic jsonifier;
 - Created a function called 'has_coroutine' on utils module;
 - Added aiohttp_jinja2 to requirements-aiohttp;
 - Added a new python3 coreragerc file to skip only python2 lines;
 - Fixed the set of validation_response on test_aiohttp_simple_api.py;
 - Added the test to check the aiohttp body request;
 - Fixed the response for 'aiohttp_bytes_response' and 'aiohttp_non_str_non_json_response' paths on aiohttp/swagger_simple.yml file.
2018-02-05 13:35:56 -02:00
Maksim Ekimovskii
2841697b9e aiohttp tests: simplify folder layout; naming refactoring. Small aiohttp_api refactoring + tests; Extend aiohttp swagger files and fake apis. Problem with request body for aiohttp handlers remains; 2018-02-03 17:40:03 +02:00