14 Commits

Author SHA1 Message Date
Robbe Sneyders
3e64fe46e9 Fix ReverseProxied middleware and add docs (#1873)
Starlette introduced some new changes to how the `root_path` is handled,
which broke our `ReverseProxied` example and test.

This PR fixes both and adds documentation on how to run behind a proxy.
2024-02-11 22:19:37 +01:00
Niels Dewulf
0082d7ad33 Fix CORS headers not set on exceptions (#1821)
Fixes #1820.
Correct error handling in response to CORS.


Changes proposed in this pull request:

- Add a MiddlewarePosition before Exception handling so CORS is always
returned
- Add ServerError Middleware to handle unhandled errors between the
ServerError- and ExceptionMiddleware
 - Update corresponding docs

---------

Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
2023-12-01 00:04:46 +01:00
MatthiasDurivet
563fbf8e77 Update the import statements for the cookbook snippets (#1805)
Updates the import statements on
https://connexion.readthedocs.io/en/stable/cookbook.html


A few of the import statements were missing, or didn't match the example
code because they imported at the wrong depth.
This should make the code in the cookbook copy-pasteable.

---------

Co-authored-by: Robbe Sneyders <robbe.sneyders@gmail.com>
2023-11-19 22:56:28 +01:00
Robbe Sneyders
26d1b84242 Add CORS documentation (#1790)
Fixes #1785
2023-11-06 18:35:44 +01:00
Robbe Sneyders
17aa31a7ab Remove cookbook docs and sort index better (#1765)
Contributes to #1531
2023-10-30 20:54:59 +01:00
Henning Jacobs
594ded9a05 Document how to use a wildcard path parameter (#1398)
* Update cookbook.rst

* address review comments
2021-07-09 17:49:42 +02:00
Daniel Grossmann-Kavanagh
343643428c update documentation (#771) 2018-11-12 09:40:42 +01:00
Roberto Polli
1596f18b3d Fix: #582. Describe logging (#693)
- Show how to configure the logger
- Show how to access the logger
2018-10-04 08:41:21 +02:00
Jeremy
6af5dff3de Update CORS documentation (#524)
Resolved error since flask cors was moved to its own project: `ExtDeprecationWarning: Importing flask.ext.cors is deprecated, use flask_cors instead.`

Will also require installation `pip install -U flask-cors`
2017-10-10 23:22:42 +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
Henning Jacobs
29e11cefd4 how to enable CORS 2016-12-02 09:27:02 +01:00
Jason Estibeiro
e6ce534082 Made minor spelling and grammatical corrections 2016-10-27 12:30:03 +05:30
Rafael Caricio
ce10979ecf How to create custom format for json types 2016-04-25 14:37:18 +02:00