Commit Graph

11 Commits

Author SHA1 Message Date
Robbe Sneyders
70084bcc4c Fix FlaskApp exception handlers (#1788)
Fixes #1787 

In the `FlaskApp`, the error handlers were still registered on the
underlying Flask app instead of on the `ExceptionMiddleware`, which led
to them not following the documented behavior.

The documentation was also incorrect about ignoring error handlers
registered on the flask application. We are only ignoring the default
error handlers registered by Flask itself.

This is a breaking change, however, since this functionality was not
following the documented behavior, and 3.0.0 was only recently released,
I propose to release this as a patch version.
2023-11-06 19:00:46 +01:00
Robbe Sneyders
26d1b84242 Add CORS documentation (#1790)
Fixes #1785
2023-11-06 18:35:44 +01:00
Robbe Sneyders
d8ceb52822 Update Exceptions documentations (#1758)
Contributes towards #1531
2023-10-29 09:58:05 +01:00
Roger Camargo
7aeb3bdfb7 #1436: [Documentation] Add a flask error handler complete example (#1437)
* #1436: [Documentation] Add a flask error handler complete example

* #1436: [Documentation] Change to use the add_error_handler function
2021-10-22 08:36:29 +02:00
Gabriele Labanca
8485b1b6f5 Update exceptions.rst (#1358)
Added import for Request in example code.
2021-06-24 14:01:34 +02:00
Daniel Grossmann-Kavanagh
d8cd116154 fix docs on adding error handler (#818) 2018-12-18 08:28:06 +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
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
George Wilson
136b960fdc Fix issues raised by @hjacobs 2016-12-23 21:56:43 +00:00
George Wilson
936c6f1555 More code style 2016-12-23 13:09:05 +00:00
George Wilson
39cd7b7b87 File name 2016-12-23 13:06:36 +00:00