Commit Graph

18 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
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
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
Diogo Dutra
a7af62fbf0 Uncouple flask from App and Api. Created Abstract classes for theses modules. Fixed the tests 2017-04-04 08:20:23 -03:00
Yoan Blanc
be437a980b Fix isort checks 2016-10-16 11:32:11 +02:00
Elisey Zanko
927e8a0154 Fix test
Produce and consume `application/json` by default
2016-09-19 15:26:58 +05:00
Rafael Caricio
c02fad46f7 Fix import ordering 2016-09-13 11:12:45 +02:00
Jens Finkhaeuser
255e419572 Move ResolverError over to exceptions where it seems to be long. 2016-09-07 13:08:04 +02:00
Jens Finkhaeuser
bce01337d4 - Add test cases for bad and missing operationIds
- Handle bad and missing operationIds with a well-defined error
2016-09-07 09:37:39 +02:00
Rafael Caricio
6358c8c47d Adopt isort to ensure better code quality 2016-04-08 14:33:27 +02:00
João Santos
351903276f #173 Don't overload built-in functions 2016-03-08 08:14:53 +01:00
Rafael Caricio
9085ae5c4b Support parameters definitions in path 2016-02-16 18:41:57 +01:00
dfeinzeig
1b51551e3f add test to make sure restyresolver handles upper and lowercase http verbs 2016-01-12 22:02:54 -05:00
John Kleijn
9beef87d7b Handle dashes in resource names in RestyResolver 2015-12-08 15:48:36 +01:00
John Kleijn
47db7a77f7 Refactored 2015-12-08 05:22:33 +01:00
John Kleijn
1f0a12b8cb Fixed bug in collection enpoint resolution whe using x-router-controller 2015-12-07 16:54:48 +01:00
John Kleijn
a3dc54a170 Pluggable operationId resolution 2015-12-06 14:59:51 +01:00