Commit Graph

63 Commits

Author SHA1 Message Date
Andrey Abramov
87a0fed4dc Remove obsolete code from basicauth example (#1486)
* Remove obsolete code

* Remove scopes completely

* Add hinting

* Remove outdated function from docs/security

* Revert "Add hinting"

This reverts commit faeea24c28bf88eead4015feea8f4dbd750cec1c.

* Change README for examples and other review fixes
2022-03-16 20:20:44 +01:00
Pavol Vargovčík
a6717c3bbf Enforcedefaults aiohttp (#1163)
* cache ConnexionRequest.json

* add openapi3 enforcedefaults_aiohttp example

Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
2022-02-23 22:31:41 +01:00
Amin Alaee
69e289bb77 Update basicauth example (#1411) 2021-08-11 09:30:43 +02:00
Christian Clauss
1012721d2d Upgrade isort==5.9.1 (#1388)
* Upgrade isort==5.9.1

* isort --thirdparty connexion,aiohttp ./tests

* isort --thirdparty aiohttp,connexion --check-only --diff .

* cd tests before running isort
2021-07-07 12:43:36 +02:00
Robbe Sneyders
41cc0cb73e Merge pull request #1303 from cuongqn/bugfix/reverseproxy-example
Fix reverseproxy example for OpenAPI 3
2021-07-05 19:30:24 +02:00
Christian Clauss
6c4f99051d Upgrade syntax for Python >= 3.6 (#1383)
* pyupgrade --py36-plus **/*.py

* Fix indentation

* Fix indentation
2021-07-04 20:04:22 +02:00
Christian Clauss
a46b66abcb Fix typos discovered by codespell (#1385)
* codespell --ignore-words-list="connexion"

* Update exceptions.py
2021-07-04 19:28:37 +02:00
Christian Clauss
ee38dbffa8 Deep six the six module 2021-07-04 12:33:58 +02:00
Robbe Sneyders
fb44e6acb4 Fix import order for isort 2021-06-25 13:08:46 +02:00
Cuong Nguyen
aa716ebbfe Update variable name in during .run() call 2020-10-12 14:14:41 -07:00
Jiehong
a21dd62b82 doc: improve documentation for Basic Auth 2020-07-20 07:20:37 +02:00
Sławomir Zborowski
bed4b95205 #1182 get rid of @asyncio.coroutine (deprecated in Python 3.8) (#1186)
Signed-off-by: Sławomir Zborowski <slawomir.zborowski@nokia.com>
2020-04-25 16:30:21 +02:00
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