Commit Graph

1485 Commits

Author SHA1 Message Date
Niels Dewulf
b10d4bc8a0 Linters 2023-11-30 14:24:42 +01:00
Niels Dewulf
0cb86487be Linters 2023-11-30 14:04:40 +01:00
Niels Dewulf
2702fd92b4 Address comment 2023-11-30 13:40:05 +01:00
Niels Dewulf
60791c234e Address comment 2023-11-30 13:36:14 +01:00
Niels Dewulf
020bb8ccd5 Linters 2023-11-30 10:54:37 +01:00
Niels Dewulf
f1f5c40ee3 Linters 2023-11-30 10:54:07 +01:00
Niels Dewulf
1783021d71 Address comments 2023-11-30 10:35:29 +01:00
Niels Dewulf
99bc046caf Address Comments 2023-11-30 10:15:41 +01:00
Niels Dewulf
46e7191234 Fix ServerError Middleware 2023-11-29 09:27:46 +01:00
Niels Dewulf
9260db4a6f Formatting 2023-11-28 18:36:41 +01:00
Niels Dewulf
39f5ad3427 Formatting 2023-11-28 18:29:41 +01:00
Niels Dewulf
bc3a4a6c39 Check of origin is returned correctly 2023-11-28 18:23:28 +01:00
Niels Dewulf
a8d13ecd80 Formatting 2023-11-28 18:19:25 +01:00
Niels Dewulf
c6cd1260e6 Fix negative test 2023-11-28 18:18:58 +01:00
Niels Dewulf
9cc22cf75f Formatting 2023-11-28 18:16:30 +01:00
Niels Dewulf
b51fce68f9 Do negative test 2023-11-28 18:12:41 +01:00
Niels Dewulf
1a438729a4 Add Tests 2023-11-28 17:55:16 +01:00
Niels Dewulf
3bac45d4de Cleanup 2023-11-28 16:48:09 +01:00
Niels Dewulf
1965f817b2 Added CORS test 2023-11-28 16:46:20 +01:00
Niels Dewulf
a0f2647541 Fix CORS headers not set on exceptions 2023-11-28 15:49:33 +01:00
Dan Price
bbd085bd39 Fix missing colons in request docs; rename /path to /foo for consistency with other examples (#1818) 2023-11-20 22:23:51 +01:00
Robbe Sneyders
004f12f88c Add more detailed v3 migration guide (#1815)
Fixes #1794
Fixes #1802
3.0.2
2023-11-20 11:17:52 +01:00
Robbe Sneyders
14e02fa97f Add interface to add WSGI middleware (#1814)
As discussed in #1807.

Allowing the injection of WSGI middleware can enable easier migration
from Connexion 2 to Connexion 3. The use cases are limited though, as
this will only work for middleware that can work at the end of the
middleware stack.
2023-11-19 23:46:21 +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
165a91511b Fix multiple file upload (#1813)
Fixes #1806
Fixes #1811
2023-11-19 22:55:40 +01:00
Robbe Sneyders
b244d80908 Fix 'Edit on GitHub' link on docs (#1799)
Fixes #1797 

[Relevant
docs](https://docs.readthedocs.io/en/stable/guides/edit-source-links-sphinx.html#github).
2023-11-09 10:05:31 +01:00
Aurélien Joga
095ae897a5 Fix middleware doc example (#1796)
I'm starting to use the project with the newly release 3 version.


70084bcc4c/docs/middleware.rst (L115-L120)

It seems this example is not correct. 

1. missing import for SecurityMiddleware
2. `ConnexionMiddleware.default_middlewares` is a list of classes, not
class instances: the filtering never happen.
2023-11-08 23:17:30 +01:00
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.
3.0.1
2023-11-06 19:00:46 +01:00
Robbe Sneyders
55bdfbaa70 Improve ASGI server documentation (#1791)
Discussions in #1757 indicate that we should document this more clearly.
2023-11-06 18:49:43 +01:00
Robbe Sneyders
a910709606 Correctly document keys available in context (#1792)
Fixes #1780
2023-11-06 18:36:23 +01:00
Robbe Sneyders
26d1b84242 Add CORS documentation (#1790)
Fixes #1785
2023-11-06 18:35:44 +01:00
Robbe Sneyders
bcf4c63b32 Fix fern link in docs (#1782) 2023-11-03 00:28:12 +01:00
Robbe Sneyders
c69e5977d9 Add Fern sponsor (#1779) 2023-11-03 00:14:35 +01:00
Robbe Sneyders
d972eae864 Add 3.0 announcement (#1774)
Final update for the 3.0 announcement on our docs.
3.0.0
2023-11-02 11:22:30 +01:00
Robbe Sneyders
f2ee190945 Fix images on PyPI (#1773)
The images are not showing correctly on
[test.pypi](https://test.pypi.org/project/connexion/)
2023-11-01 23:45:03 +01:00
Robbe Sneyders
0772056e68 Convert README from rst to md (#1772)
rst lacks different features on both Github and PyPI, making it
difficult to build an rst README that will be rendered well on both.
[The release pipeline was failing due to
this.](https://github.com/spec-first/connexion/actions/runs/6724758517/job/18277703972)
2023-11-01 23:10:20 +01:00
Robbe Sneyders
5fcda360a9 Switch back from py-swagger-ui to swagger-ui-bundle (#1756)
Tested with `swagger-ui-bundle==1.1.0` from Test PyPI.

Opening this as a draft PR, since I didn't publish `swagger-ui-bundle`
to the main PyPI yet, which I would like to do shortly before we release
Connexion 3.

Before Connexion 2.8, the `swagger_ui_bundle` version didn't have an
upper bound. So if anyone runs into any issues because of this update,
I'd rather have them come look for answers when Connexion 3 is out.
2023-11-01 21:26:56 +01:00
Robbe Sneyders
bd704d2aec Update v3 documentation for release (#1771) 2023-11-01 21:11:02 +01:00
Robbe Sneyders
989b5f7f2c Update readme (#1769)
Contributes to #1531

---------

Co-authored-by: Ruwan <ruwan.lambrichts@ml6.eu>
2023-11-01 20:54:28 +01:00
Tzu-ping Chung
9c02fdfa74 Improve JSON req error on disallowed empty body (#1761)
Fixes #1152.

Currently, when a request body is empty, the JSON request validator
would parse it into None, which is later passed down to the JSON Schema
validator. However, jsonschema's validation error message for this case
(when nullable is false) "None is not of type 'object'" is not
particularly friendly to either the API user, nor the website developer.

This change adds a specific check before the None value is passed to
jsonschema to emit a better error message directly.

I also added some drive-by improvements on function argument typing
since _validate in validators don't seem to expect receiving None, but
_parse (the result of which is passed to _validate) is totally allowed
to return None (or anything really). This does not seem to reflect the
logic well.

I’m not exactly sure if this is the best way to do this in Connexion
3.x. [We do have a patch in Connexion 2.x to achieve a similar
effect](e89a7eeea6)
so if anyone understands how the two implementations correspond please
tell me whether the two do the same thing 🙂

---------

Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
2023-11-01 20:53:07 +01:00
Robbe Sneyders
e7dc56c476 Add new authors' copyright notice (#1770)
This PR adds a copyright notice for the new authors / maintainers of
connexion. It also reformats the license / notice files as prescribed by
the license.
2023-11-01 20:31:59 +01:00
Robbe Sneyders
a7584a6113 Import WSGIDecorator under connexion.decorators (#1768) 2023-11-01 15:27:12 +01:00
Robbe Sneyders
c1ef3f4e3a Add gunicorn with uvicorn workers to docs (#1766)
Fixes #1755
2023-10-31 20:08:17 +01:00
Robbe Sneyders
cbeac6f2c1 Update security docs (#1764)
Contributes to #1531
2023-10-31 20:08:04 +01:00
Robbe Sneyders
17aa31a7ab Remove cookbook docs and sort index better (#1765)
Contributes to #1531
2023-10-30 20:54:59 +01:00
Robbe Sneyders
99c7a13b53 Update cli docs (#1763)
Contributes towards #1531
3.0.0a8
2023-10-29 14:23:21 +01:00
Robbe Sneyders
4556779343 Fix CLI and drop click dependency (#1762) 2023-10-29 11:34:55 +01:00
Robbe Sneyders
d8ceb52822 Update Exceptions documentations (#1758)
Contributes towards #1531
2023-10-29 09:58:05 +01:00
Robbe Sneyders
452ffc7676 Add testing documentation (#1760)
Contributes towards https://github.com/spec-first/connexion/issues/1531
2023-10-29 09:40:43 +01:00
Robbe Sneyders
77a63a07ef Add lifespan documentation (#1759)
Contributes towards https://github.com/spec-first/connexion/issues/1531
2023-10-29 09:40:16 +01:00