Connexion 3 is now in Alpha 🎉
- Connexion can now be used as middleware to supercharge any ASGI or WSGI compatible framework.
- Aiohttp support has been dropped in favor of an ASGI compatible
AsyncApp
built on top of Starlette. - Connexion functionality is now pluggable by adding or removing middleware.
- Validation is now pluggable by content type, solving longstanding issues regarding endpoints with
multiple content types and providing a pluggable interface.
Breaking changes
- Aiohttp support was dropped, use
connexion.AsyncApp
instead - The
options
argument has been renamed toswagger_ui_options
- The
uri_parser_class
is now passed to theApp
or itsadd_api()
method directly
instead of via theoptions
argument. - The
jsonifier
is now passed to theApp
or itsadd_api()
method instead of setting it
as an attribute on the Api. - Drop Flask 1.X support and support Flask 2.X async routes
- Drop Python 3.6 (and add Python 3.10) support
connexion.request
is now a StarletteRequest
instead of a FlaskRequest
- Route priority changed. The most specific route should now be defined first in the specification.
- We no longer guess a content type for response serialization if multiple are defined in the spec.
We do take into account returned headers. - Don't return 400 when read-only property is received
- Content type is now validated for requests and responses if defined in the spec
- The deprecated positions for
x-body-name
are no longer supported - The parameter
pass_context_arg_name
has been removed. Context is now available as global
request-level context, or can be passed in by defining acontext_
parameter in your view function. - The
MethodViewResolver
has been renamed toMethodResolver
, and a newMethodViewResolver
has been added to work with Flask'sMethodView
specifically. - Built-in support for uWSGI has been removed. You can re-add this functionality using a custom middleware.
What's Changed
- Drop aiohttp support by @RobbeSneyders in #1491
- Add Python 3.10 in favor of 3.6 by @RobbeSneyders in #1494
- Add empty connexion middleware by @RobbeSneyders in #1502
- Extract Swagger UI functionality into middleware by @RobbeSneyders in #1496
- Add pre-commit hook by @RobbeSneyders in #1511
- Add routing middleware by @RobbeSneyders in #1497
- Extract security to middleware by @RobbeSneyders in #1514
- Remove myself (Rafael Caricio) as maintainer by @rafaelcaricio in #1517
- Merge V2 to main by @RobbeSneyders in #1518
- Fix deprecation warning for Validator.iter_errors by @jonasboecquaert in #1536
- Refactor routing into middleware-api-operation model by @RobbeSneyders in #1533
- Clean up operation classes by @RobbeSneyders in #1535
- Removed jsonschema version check by @jonasboecquaert in #1540
- Remove built-in support for uWSGI by @jacobstanly89 in #1544
- Fix for bug of the function is_json_mimetype() by @jacobstanly89 in #1541
- Use resolver in security middleware by @RobbeSneyders in #1553
- call as_view in methodresolver by @bluebrown in #1552
- Fix async tests by @Ruwann in #1558
- Add test for MethodViewResolver by @RobbeSneyders in #1559
- debug mode interaction for non-flask server by @thvu11 in #1556
- Add .git-blame-ignore-revs file with black commit by @RobbeSneyders in #1561
- Feature/method views args by @bluebrown in #1564
- Activate mypy check in pre-commit by @RobbeSneyders in #1560
- Remove "type: ignore" by using list(dict), not dict.keys() by @cclauss in #1575
- Merge v2 to main by @RobbeSneyders in #1579
- Resolve $ref referring to another $ref by @chibacchie in #1584
- Update json for Flask 2.3 by @RobbeSneyders in #1582
- Use Flask request_ctx instead of _request_ctx_stack by @RobbeSneyders in #1583
- setup.py: Update url by @jayvdb in #1586
- Extract JSON request body validation to middleware by @RobbeSneyders in #1588
- Remove AbstractSwaggerUIAPI class by @RobbeSneyders in #1589
- Removed internal variable pass_context_arg_name by @leonardofesta in #1568
- Explicitly support Flask async routes by @RobbeSneyders in #1592
- Extract boilerplate code into Routed base classes by @RobbeSneyders in #1590
- Move JSON response body validation to middleware by @RobbeSneyders in #1591
- Remove support for deprecated x-body-name position by @RobbeSneyders in #1600
- Avoid warning with jsonschema 4.16.0 by @gaetano-guerriero in #1601
- Add form data validator for validation middleware by @RobbeSneyders in #1595
- Flask apps only signal an exception on real server errors by @enerqi in #1611
- Move parameter validation to middleware by @RobbeSneyders in #1610
- Add async app by @RobbeSneyders in #1613
- Update examples for Connexion 3.0 by @RobbeSneyders in #1615
- Refactor decorators by @RobbeSneyders in #1618
- Switch to own maintained version of swagger-ui by @RobbeSneyders in #1619
- Expose additional context by @RobbeSneyders in #1620
- Implement user facing interface for ConnexionMiddleware by @RobbeSneyders in #1621
- Enable enforcing defaults by @RobbeSneyders in #1616
- Cache operation body definition by @RobbeSneyders in #1626
- Coerce types only in uri parser by @RobbeSneyders in #1627
- Introduce poetry by @RobbeSneyders in #1628
- Bump httpx version to 0.23 to mitigate GHSA-h8pj-cxx2-jfg2 by @RobbeSneyders in #1632
- Refactor tests by @RobbeSneyders in #1631
- Define request interface and align WSGI and ASGI by @RobbeSneyders in #1636
- Feature/request context by @RobbeSneyders in #1639
- Add error handlers for AsyncApp by @RobbeSneyders in #1640
- Make tests framework agnostic by @RobbeSneyders in #1634
- Bump starlette version by @Ruwann in #1641
- Bump a2wsgi and drop monkeypatch by @RobbeSneyders in #1647
- Update NumberConverter regex to match new Werkzeug behavior (v3) by @RobbeSneyders in #1644
- Re-add tests for multiple and mixed file uploads by @RobbeSneyders in #1642
- Add support for relative refs in spec by @RobbeSneyders in #1648
- Clean up errors and fix hierarchy by @RobbeSneyders in #1649
- Enforce required RequestBody by @RobbeSneyders in #1652
- Create abstract validator classes by @RobbeSneyders in #1653
- Enable response mimetype validation for non-error responses by @RobbeSneyders in #1654
- Don't return 400 when read-only property is provided by @RobbeSneyders in #1655
- Add jsonifier as argument to app / api by @RobbeSneyders in #1656
- Add high-level documentation for 3.0 by @RobbeSneyders in #1646
- Run release pipeline for pre-releases as well by @RobbeSneyders in #1658
- Fix filter pattern in release pipeline by @RobbeSneyders in #1659
New Contributors
- @jacobstanly89 made their first contribution in #1544
- @bluebrown made their first contribution in #1552
- @thvu11 made their first contribution in #1556
- @chibacchie made their first contribution in #1584
- @jayvdb made their first contribution in #1586
- @leonardofesta made their first contribution in #1568
- @gaetano-guerriero made their first contribution in #1601
- @enerqi made their first contribution in #1611
Full Changelog: 2.13.0...3.0.0a1