Commit Graph

51 Commits

Author SHA1 Message Date
Daniel Grossmann-Kavanagh
e85960947f Merge branch 'master' into dynamic_ui_path 2019-12-17 11:42:35 +11:00
Roberto Polli
9fdd9587e6 Fix: #910. Add swagger-ui to requirements. Update connexion version. (#911) 2019-12-12 18:29:09 +01:00
Daniel Grossmann-Kavanagh
d0efe57433 fix deprecated logging.warn calls in reverse proxy examples 2019-12-11 18:23:08 -08:00
Julien Sagnard
a6496975de Improve with PR comments 2019-12-11 17:59:43 -08:00
Daniel Grossmann-Kavanagh
c672c85c00 add tests for reverse proxies 2019-12-11 17:58:15 -08:00
Daniel Grossmann-Kavanagh
2b23b75ce0 add aiohttp reverse proxy example 2019-12-11 17:58:15 -08:00
Daniel Grossmann-Kavanagh
93fe858922 add reverseproxy example 2019-12-11 17:58:15 -08:00
Jyhess
db4459fa20 Datetime serialization (#851)
* Add datetime and uuid serialization for AioHttp

* Remove ujson dependency

* fix merge error

* Retry CI

* remove bad jsonifier import

* remove ujson import
2019-12-03 05:23:36 +01:00
Spencer Herzberg
0989a93df5 fixes basic auth example doc; adds apikey example (#894)
* fixes basic auth example doc; adds apikey example

* remove required_scopes references that dont pertain to apikey
2019-03-11 08:22:37 +01:00
Simon
92867452a2 Added MethodViewResolver (#847)
* Added MethodViewResolver

By subclassing RestyResolver and modifying its `resolve_function_from_operation_id` method, it is now possible to use automatic routing functionality with Flask's MethodView together with MethodViewResolver.

* Add MethodView example

* Add tests for methodview

* add documentation on how to use MethodViewResolver
2019-02-04 08:25:27 +01:00
krise3k
6ec11825b8 Add support for JWT authentication (#732)
* Add support for JWT

* Add example for JWT

* Add minimal JWT documentation
2018-11-12 08:53:50 +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
Daniel Grossmann-Kavanagh
08faf2aa86 disable threading in sqlalchemy demo (in-memory db) (#709)
- disable threading in sqlalchemy demo
2018-10-04 14:55:30 +02:00
Daniel Grossmann-Kavanagh
5bc8a788aa fix 500 in sqlalchemy example (#581) 2018-04-27 08:13:30 +02:00
Henning Jacobs
a64884075e README for local validation 2018-01-13 18:28:27 +01:00
Maico Timmerman
a17caefd8e Added option for local function token lookup. 2018-01-10 22:59:06 +01:00
Mohab Usama
a275f7b0e2 Use Authorization headers for verifying token info (#542)
* Use Authorization headers for retrieving token info

* Fix flake8

* Adjust token info example

* Only accept Authorization headers in test
2017-11-14 18:13:41 +01:00
Mikko Valkonen
dedc5d1450 fix the enforcedefaults example
The enforcedefaults example did not run as the port (9090) was passed as
the server parameter.
2017-08-16 11:38:42 +03:00
Mikko Valkonen
3833cb10e7 fix the helloworld example
The helloworld example did not run as the port (9090) was passed as the
server parameter.
2017-08-16 11:38:37 +03:00
Henning Jacobs
d9edc36647 Ignore context args (#429)
* #428 add unit test

* #428 ignore context param if not in function args

* #428 update OAuth2 example app

* #428 update security docs
2017-04-05 14:32:40 +02:00
Diogo Dutra
5cc848f3e3 fixed missing method parameters and trailling spaces 2017-04-04 08:20:24 -03: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
Petr Horáček
e166d0fea5 add documentation for custom validators 2016-12-04 13:07:21 +01:00
Henning Jacobs
da30971792 #292 add example mock Swagger YAML (without any operation IDs) 2016-09-29 11:43:23 +02:00
Henning Jacobs
2b5f857e51 #292 add --mock option to return example data 2016-09-29 11:14:36 +02:00
Rafael Caricio
d9b59c65ac Fix imports 2016-09-13 22:44:15 +02:00
Jens Finkhaeuser
74cec244b4 Fixes after running & fixing TOXENV=isort-check tox 2016-09-13 16:24:28 +02:00
Jens Finkhaeuser
6476c033d2 Fix isort errors 2016-09-13 16:03:57 +02:00
Henning Jacobs
a30681992f fix flake8 formatting of SQLAlchemy example 2016-06-03 23:52:45 +02:00
Nicola Musatti
7ba69e611b Sorted imports with isort. 2016-06-03 22:55:25 +02:00
Nicola Musatti
8d2a1766d4 Applied reviewers' suggested changes. 2016-06-03 22:41:33 +02:00
Nicola Musatti
f6776d6bbf Relaxed Flask version requirement. 2016-06-03 22:40:33 +02:00
Nicola Musatti
1a167ff212 SQLAlchemy example first import. 2016-06-03 00:24:15 +02:00
Rafael Caricio
c30bdbb324 Fix import sorting in examples and tests 2016-04-08 14:33:27 +02:00
Rafael Caricio
a86b96c5e2 Sort imports in tests and examples 2016-04-08 14:33:27 +02:00
Rafael Caricio
6358c8c47d Adopt isort to ensure better code quality 2016-04-08 14:33:27 +02:00
João Santos
0ff54f9161 #148 Remove usage of HTTP_TOKENINFO_URL environment variable 2016-03-04 12:29:34 +01:00
Rafael Caricio
bf24e8fa8c Recommend usage of decorator 2016-02-15 17:33:03 +01:00
hjacobs
b70c9536eb fix RestyResolver example to work with Python 3 2016-02-01 23:39:04 +01:00
John Kleijn
e52fdc4b82 Removed unneeded Response creation 2016-01-31 09:12:25 +01:00
John Kleijn
2bf68575ac RestyResolver Example 2016-01-30 13:43:21 +01:00
hjacobs
910cdcf8d3 #123 add missing "info" property to comply with Swagger Spec 2016-01-22 21:46:11 +01:00
hjacobs
f21b91f75f #123 add some comments 2016-01-22 19:41:44 +01:00
hjacobs
fcb20c7e05 #123 add OAuth2 example with mock tokeninfo endpoint 2016-01-22 19:36:50 +01:00
hjacobs
fdb4a3daf2 #123 install Connexion from PyPI 2016-01-22 19:11:57 +01:00
hjacobs
70d247a780 #123 add "basicauth" example for Connexion 2016-01-22 19:08:54 +01:00
João Santos
e3fbaab99f https://github.com/zalando/connexion/issues/6 Small fix to specs yamls 2015-06-13 17:25:37 +02:00
João Santos
0a6dcfddf0 https://github.com/zalando/connexion/issues/1 Allow variables in specification using jinja2 2015-06-05 16:04:20 +02:00
hjacobs
a62b75dbf2 add README for hello world example 2015-05-21 23:46:10 +02:00