NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #2130 most downloaded on PyPI
Production-ready community-driven modern Stripe-like API versioning in FastAPI
Latest stable
9.0.0
Last release 14 days ago
08 Nov 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
3 years old
148 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
This release fixes many long-standing bugs, removes deprecated APIs, and adds new features. Most fixes change wrong behavior that apps or their client…
This release fixes many long-standing bugs, removes deprecated APIs, and adds new features. Most fixes change wrong behavior that apps or their clients may rely on, which is why it is a major release. Before upgrading, check the Breaking entries in the full changelog; each one says how to migrate. In short:
/changelog, generate_changelog(), hidden()), Cadwyn(openapi_prefix=...), Cadwyn(api_version_header_name=...), Cadwyn.add_header_versioned_routers(), and the old version_changes and version_dates attributes.{api_version} parameter of the matched route, and version headers with underscores in their names are validated and documented under their exact name.Annotated, and type aliases.New: versioning for WebSocket routes, per-version OpenAPI customization with openapi_customizer, changing model config with schema(Model).had(config=...), and removing validators assigned as model attributes.
Full Changelog: https://github.com/zmievsa/cadwyn/compare/8.2.0...9.0.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
/changelog, generate_changelog(), and hidden(). Remove their calls and the changelog arguments of Cadwyn(), keeping the instructions that you wrapped in hidden(); changelog_url=None and include_changelog_url_in_schema=False still work with a DeprecationWarning until 10.0 (#487).Cadwyn(openapi_prefix=...). Set the root path on your server instead (#488).Cadwyn(api_version_header_name=...). Pass the same value to api_version_parameter_name (#550).Cadwyn.add_header_versioned_routers(). Put the versions and their changes in a VersionBundle, then include the latest routers with generate_and_include_versioned_routers() (#550).Version.version_changes, HeadVersion.version_changes, and VersionBundle.version_dates. Use changes and version_values instead (#550).api_version_parameter_name="api_version", are now validated and documented under that exact name. Invalid versions get a 422 instead of the latest version, and OpenAPI shows api_version instead of api-version, which Cadwyn never read, so regenerate clients that send api-version (#630).{api_version} parameter of the matched route, not from any URL segment that equals a version, such as a tenant ID. Values that aren't one of your versions get a 404 or a rejected WebSocket, and a URL that matches routes of several versions with {api_version} in different positions raises CadwynError, so check that clients send the version in its route position and keep that position the same across versions. URLVersionManager now takes api_version_parameter_name and versioned_routers instead of possible_version_values (#622)..had(alias=...) and .didnt_have("alias") now also change the validation and serialization aliases that Pydantic derived from the old alias, so older versions use the documented key and reject data with only the old key. Add request and response migrations for the key, or remove the alias change to keep the old key (required in HeadVersion); see alias migrations (#465).Union[A, B], Optional[A]), in Annotated, and in named type aliases. A migration of the whole union replaces its members' migrations in the same version change. Remove path migrations that now duplicate them, return model objects from such endpoints, and pass migrate_http_errors=False to member migrations; see data migrations for the new errors (#530).list[Model] and dict[str, Model] request bodies now keep extra keys, set fields, and aliased values in older versions, and run default factories for unset fields, when Cadwyn can be sure that it's right. Check code that uses model_extra, exclude_unset, or stateful factories, and set fields in a request migration if older clients need them; known limitations lists the bodies that keep the old behavior (#566).request.body or the latest model as input. Compute such values in the migrations that need them, and stop reading them from model_extra; responses and models that override model_dump() keep their previous behavior (#570).Content-Type header, so migrations and body params may now get bytes or defaults. Send Content-Type: application/json, or set strict_content_type=False on the app, router, or route (#531).CadwynHeadRequestValidationError has the restored body's errors. Update handlers and tests that read these errors; to get a default that only a custom core schema supplies, delete the rejected value in a request migration (#563).migrate_response_body() now restores validation aliases only when missing keys would certainly fail validation, as routes do, and a restored body that still fails reports its own errors. Set validation keys in response migrations for other cases, and update handlers and tests that check these errors (#565).migrate_response_body(), and invalid values raise errors in routes too instead of becoming the default. To get the default, delete such values in a response migration or from latest_body (#565).Json[...] fields in supported request bodies now get the string that the client sent, e.g. Json[Any] keeps "123" instead of giving 123. Make clients encode such values once instead of twice; migrations that encode values with json.dumps() keep working, subject to known limitations (#538).body, or named after the body's alias, no longer replaces the request body. Path migrations of affected endpoints with files, forms, or embedded bodies now get the client's body or request.form; replace uploads in a request migration, or read the dependency's value explicitly (#526).CadwynError, so use distinct names or aliases, or read the form from Request (see known limitations) (#527).AliasChoices keys as extras. Stop sending unused aliases when the model forbids extra fields, or allow extras if you need them (#527).CadwynError (#529).CadwynError on newer versions (#532).enum(...) instructions now reach endpoints as latest members, including in Iterable[...] and Generator[...] fields, and older enums accept matching latest members. Compare union fields to members rather than raw values, use migrations if you relied on _missing_ replacing known members, and use isinstance(member, MyEnum) to tell latest members apart (#521).nonmember() attributes, @member functions, definition order, and custom member attributes, and had() creates members as the class body does. Send member values, treat @member functions as members, and update OpenAPI snapshots; a custom __new__ that can't recreate attributes from the member value now fails at startup, so compute such attributes from the value (see Enum migrations) (#555).enum(MyEnum).had(member=auto()) now uses the enum's _generate_next_value_. Pass explicit values to keep the old ones (#554).Iterable or Generator request field, each now gets all of its items, as in plain FastAPI, instead of the items that the others haven't consumed. A param that reads such a body as another type (e.g. body: dict = Body()) now finds an iterable instead of an iterator at that field, so replace next(value) with next(iter(value)) (#633).T of a bare Page or item: T in a non-generic model, now validate and document their bounds, constraints, and defaults with each version's models and enums, so older versions reject latest-only shapes. Add request and response migrations for the outer model or the endpoint; where Cadwyn can't version such a fallback, it raises SchemaGenerationError at startup, so pass explicit type args there (#584).__mro_entries__ (e.g. class Child(Alias())) now inherit the versioned copies of their resolved bases, like explicit subclasses. Update their migrations for the older-version fields, and fix rename or deletion instructions that now fail at startup (#588).existed_as() to keep both; see inherited fields (#525, #581)..didnt_exist now fails at startup if the schema would still inherit that field from a base. Delete it from the base in the same version too (#582).SchemaGenerationError. Use plain containers for versioned classes or callables, and break cycles through factories (see Defaults) (#564).cadwyn render handles NamedTuple, defaultdict, and Counter defaults, and raises CadwynRenderError for defaults that it can't render faithfully. Use a named Field(default_factory=...) for them; nonfinite floats and complex numbers now render as executable float(...) and complex(...) calls (#590).had(...) now rejects the current object itself even when it is unequal to itself, such as a shared math.nan. Remove the redundant instruction (#541).InvalidGenerationInstructionError for a had(...) that sets a field attribute to its current value now says of "Model" instead of from "Model". Update tests that match the old wording (#541).schema(M).validator(M.check_a).didnt_exist no longer removes another validator when check_a holds a function named like it, such as check_b in check_a = field_validator("a")(check_b). It now removes check_a, or raises CadwynStructureError if the function backs several validators; then pass the attribute name, e.g. schema(M).validator("check_a").didnt_exist (#133).endpoint("/ws", ["WEBSOCKET"]) with .existed, .didnt_exist, and .had(path=..., name=..., dependencies=...) (#67).openapi_customizer to Cadwyn() to customize each generated OpenAPI document with its selected version, or None for the unversioned document. The callback must be synchronous and return the edited dict or a replacement dict (#255).check_x = field_validator("x")(func), with schema(M).validator("check_x").didnt_exist (#133).schema(Model).had(config=ConfigDict(...)). It supports keys such as extra, frozen, title, and validate_by_name on models without subclasses; see Change model configuration (#91).run_background_tasks_of_latest_version_dependencies=True to Cadwyn() or generate_versioned_routers() to run tasks added during the latest dependency solve even when the endpoint has no BackgroundTasks param (#568).model_post_init again (#592).convert_request_to_next_version_for() and convert_response_to_previous_version_for() (#530).had(...) instructions now accept distinct values that compare equal, such as True and 1, instead of rejecting real changes. Unknown objects are compared by identity (see instruction comparisons) (#541).BackgroundTasks param, now warns once per route; 10.0 will run them. Pass run_background_tasks_of_latest_version_dependencies=True now, and add each task only when current_dependency_solver == "fastapi" to avoid duplicates; see background tasks (#568).typing.get_type_hints() no longer fails on generate_versioned_routers() (#614).UploadFile params: Cadwyn closes uploads after the response and its background tasks, including the uploads that migrations add, replace, or remove (#561).enum(...) instructions now work in lazy Iterable and Generator request fields without consuming items early, with the same values as list fields (#591).migrate_response_body() (#565).Final[int], TypeGuard, TypeIs, or ClassVar[Final[...]] (#576).vars() and __dict__, and enums declaring __slots__ no longer fail to copy (#555).Json[...] fields accepting strings or string-enum members no longer fail with a 500 (#538).Bump the uv group across 1 directory with 2 updates by @dependabot[bot] in https://github.com/zmievsa/cadwyn/pull/502
Full Changelog: https://github.com/zmievsa/cadwyn/compare/8.1.1...8.2.0
body: Any = Form() next to body: Annotated[MyModel, Form()]) now gets its own value from the form instead of the whole form model, like in FastAPI itself (#496).cadwyn command can import modules from the current directory again, so cadwyn render module data.schemas --app=main:app --version=... works when run from the folder that contains main.py and data/. Before, it failed with ModuleNotFoundError unless it was run as python -m cadwyn. Cadwyn 1.0.2 had fixed this, but later versions stopped putting the current directory on sys.path.migrate_response_body() call without its versions argument, swapped "adding" and "removing" enum member examples, a VersionChangeWithSideEffects example without instructions_to_migrate_to_previous_version, a hidden() example that changed path params (which Cadwyn rejects), a "remove a required field" recipe that left HEAD without the default it needs, and missing or wrong imports in several examples.current_dependency_solver example. The "Version changes" page also no longer suggests renaming an inherited field in each child schema instead of the parent, which keeps the old field next to the new one. The "Enum migrations" examples now show the enum they change (class MyEnum(str, Enum)).versions and my_versions modules or pass ... to Cadwyn(), and the validator examples no longer have unused imports. The "Schema migrations" page now says to rename an inherited field in the schema that declares it, because renaming it in a subclass keeps the old field next to the new one. The cadwyn render examples on the "Schema generation" page now say to run them from the app's directory.api_version_parameter_name defaults to "X-API-VERSION", that a schema can have both default and default_factory, that validators can reject values with TypeError, and references to the data.vXXXX_XX_XX packages that Cadwyn no longer generates.body: Annotated[Optional[MyModel], Form()] = None) no longer fail with a 500 error in every API version when the request has none of the model's form fields. Request migrations get None as the body, and the endpoint gets the param's default (#495).None. Cadwyn handled the way FastAPI looks up form models only from FastAPI 0.159.0, while FastAPI changed it in 0.158.2 (#495).Body(embed=True)) of a dependency override that has the same name as the endpoint's form model param (e.g. body: Annotated[MyModel, Form()] in the endpoint and body: str = Form() in the override) now gets its own value from the form model's data instead of the whole form model, like in FastAPI itself. If the data has no value for it, it gets its default. Before, this failed with a 500 error, or, if the param accepted the form model's data (e.g. body: Any = Form()), gave it the whole form model. Requests in which another param of an override takes the whole body, a required param has no value in the data, or the form has a value for a param that the form model of the request's API version doesn't have a field for (e.g. a field that only newer versions of the model have, or, for a union of form models, a field that only the members that the request doesn't match have), work as before (#496).body: Annotated[Union[ModelA, ModelB], Form()]) no longer fail with a 500 error in every API version, including when the models have set, frozenset, or tuple fields. Endpoints that take an optional union of form models (e.g. body: Annotated[Optional[Union[ModelA, ModelB]], Form()] = None) now get the form data instead of None, and no longer fail with a 500 error when the request has none of the models' form fields. Request migrations of these endpoints get the form data of the model that the request matches as the body, or None if the request has no form data for the optional union. Requests whose body has a list, set, or tuple in a field that a model of the union takes a single value for (e.g. a field of type Any that a validator or a migration fills with a list, or a field that a model which allows extra fields doesn't have) behave as before, because FastAPI would give the field only one of the values.enum(...) instructions on a Flag or IntFlag enum no longer make every route and the OpenAPI return a 500 error. The enum of each version has the members of that version, combines them like a hand-written enum, and keeps the enum's boundary (#522).type alias that refers to itself (Python 3.12+), directly or through other type aliases, no longer fail with a 500 error in every API version when the alias only contains builtin types, such as type JSON = dict[str, JSON] | list[JSON] | str | int | None, and other such aliases. Recursive type aliases that contain anything else, such as models, enums, other classes, forward refs, or Annotated, still can't be versioned: instead of a RecursionError, the first request now fails with a SchemaGenerationError that names the alias (#524).body: Annotated[Optional[MyModel], Form()] = None), or, with FastAPI 0.161.0 or newer, of an optional union of form models, a dict that a request migration sets as the body (e.g. request.body = {"name": "x"}) now reaches the endpoint, the dependencies that declare the same form model under the same param name, and the dependency overrides that declare the same form model. Before, they got None, or a 500 error for some unions. A body that the form model rejects now fails with a 500 error, as it does when the form supplies the model. Everything else behaves as before, including a dict with none of the form model's fields (e.g. {}), which gives the param its default, as FastAPI does for a form, a body that isn't a dict or that has a key named like the param (e.g. {"body": {"name": "x"}}), another form model or form field with the same name as the param, a param that gets the whole body (e.g. payload: dict = Body() in an override of a dependency that only the latest version has), a form field that isn't a form model (e.g. x: str = Form("d") in an override), a dependency that declares a form model under another param name, a key that another param reads next to a form model that allows or forbids extra fields, and, for a union, a body with values that FastAPI would change when it validates them as form data (e.g. an empty string, or a one-item list in an extra field) (#529).Json[...] fields (e.g. data: Json[dict]), including form models and nested models, no longer fail with a 500 error in the latest API version and in the older versions whose body models are the same as the latest version's. Request migrations still get the parsed values of these fields. If Cadwyn can't be sure that the latest version gets what the client has sent everywhere in the body, the request behaves as before. Known limitations lists these cases (#523).Publish separate docs for each release by @zmievsa in https://github.com/zmievsa/cadwyn/pull/499
Full Changelog: https://github.com/zmievsa/cadwyn/compare/8.1.0...8.1.1
latest points to the newest release and dev to the main branch.--root-path /prefix, or a parent app with a root path that mounts the Cadwyn app), the version links on /docs and /redoc no longer repeat the root path (/prefix/prefix/docs?version=...) and lead to a 404 (#501).The deprecated changelog (/changelog, generate_changelog(), and hidden()) will be removed in 9.0.
This release fixes form-model endpoints on FastAPI 0.159+ and starts warning about alias instructions that will change in 9.0. See the full changelog. In short:
body: Annotated[MyModel, Form()]) no longer fail with a 500 error in every API version..had(alias=...) and .didnt_have("alias") now warn at startup (FutureWarning) when the field keeps its old key. Cadwyn 9.0 will change them too (#465)./changelog, generate_changelog(), and hidden()) will be removed in 9.0.Full Changelog: https://github.com/zmievsa/cadwyn/compare/8.0.0...8.1.0
/changelog, generate_changelog(), and hidden()) will be removed in 9.0..had(alias=...) and .didnt_have("alias") now warn at startup (FutureWarning) when the field keeps the validation_alias or serialization_alias that Pydantic copied from its old alias, and so keeps its old key. Cadwyn 9.0 will change them too (#465).body: Annotated[MyModel, Form()]) no longer fail with a 500 error in every API version.This release fixes many long-standing bugs, most of them reported by users. Most apps can upgrade without changes. It is a major release because some
This release fixes many long-standing bugs, most of them reported by users. Most apps can upgrade without changes. It is a major release because some fixes change wrong behavior that apps or their clients may rely on. Before upgrading, check the Breaking entries and the Upgrade note in the full changelog. In short:
Page[Item].schema(Child).field(...) instructions for inherited fields no longer leak into parent and sibling models.Annotated[T, Depends(f)] dependencies use the versions of models and enums that the request's API version has, in the versions that change them.Full Changelog: https://github.com/zmievsa/cadwyn/compare/7.4.0...8.0.0
This release fixes many long-standing bugs, most of them reported by users. Most apps can upgrade without changes. It is a major release because some fixes change wrong behavior that apps or their clients may rely on. Before upgrading, check the Breaking entries and the Upgrade note below. In short:
Page[Item].schema(Child).field(...) instructions for inherited fields no longer leak into parent and sibling models.Annotated[T, Depends(f)] dependencies use the versions of models and enums that the request's API version has, in the versions that change them.schema(Model).had(description=...) gives older versions of a model their own OpenAPI description (#168).Page[Item] now use the versioned copies of their type args in requests, responses, and OpenAPI (#416, #420). Older versions validate and serialize these args with their own models, so older clients that relied on the latest models inside generics may need converters for the generics: converters for Item don't run for the items of Page[Item]. The OpenAPI names of some generics change, and migrate_response_body no longer accepts instances of the latest models inside them. See Generic models for details.schema(Child).field(...).had(...) and .didnt_have(...) for an inherited field now change it only in Child and its subclasses, not in its parent and siblings (#466). To keep the old behavior, give the instruction to the parent instead. If a parent renames such a field, the subclass's changes follow the new name only through single, non-generic inheritance. cadwyn render now renders each model's own attributes in each version. See Fields that a schema inherits for diamonds and generics.Annotated[T, Depends(f)], Annotated[T, Security(f)], or Annotated[f, Depends()] now use the version's own copy of f in the versions that change the models or enums its parameters validate (#467). Requests that relied on the latest dependency can now get a 422, and in these versions the dependency receives the version's copies of models and enums, so compare them by value rather than with isinstance or is. See Versioned dependencies.generate_versioned_models(versions)[version][Category] is Category.app.dependency_overrides is now FastAPI's plain attribute. Removed the undocumented cadwyn.applications.FakeDependencyOverridesProvider and the Cadwyn.dependency_overrides property.APIRouter to app.router, as in FastAPI. Cadwyn still needs its own router there, so don't replace it.openapi_prefix argument of Cadwyn(). FastAPI 0.145.0 removed it, so on FastAPI 0.145.0 and newer it now raises a clear TypeError, and on older FastAPI it emits a DeprecationWarning. Configure your server's root path instead.from __future__ import annotations) or quoted request body annotations used the latest models since 6.0.1. Now they use their own models, as documented, so clients that kept sending the latest shape may get a 422.RecursionError), when models refer to themselves, e.g. children: "list[Category]" (#419). Where Cadwyn can't copy such models, it now raises a SchemaGenerationError that names them. See Models that refer to each other.validation_alias or serialization_alias (#260, #370). Bodies that worked before are unchanged.api_version_default_value isn't set (#277)."example": {} to the OpenAPI of parameters declared with defaults such as = Query() (#417).Cadwyn() failing on FastAPI 0.145.0 and newer (#462).None default that their type rejects, or a quoted body annotation.uvicorn module:app returning a 500 for every request since 7.1.1.Cadwyn(strict_content_type=False) having no effect.bytes, in endpoints and dependencies, arriving empty in non-head versions. These versions now hold such uploads in memory twice per request. Dependencies that move an upload only when current_dependency_solver is "fastapi" may now see it moved back to its start; see Dependency re-execution warning.body or a body alias that matches another parameter's name.functools.partial dependencies lost their annotations;__signature__ lost their parameter types;yield;Depends(scope=...) was lost;app.dependency_overrides was ignored in older API versions for class instances, bound methods, and partials;= Query() were shared between versions and apps.functools.lru_cache dependencies with postponed annotations;TYPE_CHECKING on Python 3.14;typing.Self;Callable or Unpack[Ts];TYPE_CHECKING on Python 3.14;items: list[Wrapper[T]].TypeError: unhashable type in older API versions for unhashable request body or response model annotations.schema(...).field(...).didnt_have(...) having no effect on title, description, examples, and deprecated declared through Annotated[..., Field(...)].didnt_have("title"), didnt_have("min_length"), and didnt_have(...) failing with TypeError on Annotated types with validators, Len, Strict, or AllowInfNan.had(default=...) and had(default_factory=...) failing with pydantic's TypeError at startup when they leave a field with both a default and a default factory. Cadwyn now raises InvalidGenerationInstructionError, and the instruction's value replaces the one from Annotated[..., Field(...)]./changelog failing with a 500 for self-referencing models, and on every call after the first one for instructions on inherited fields.Bump js-yaml from 4.3.1 to 4.3.2 in the npm_and_yarn group across 1 directory by @dependabot[bot] in https://github.com/zmievsa/cadwyn/pull/409
Full Changelog: https://github.com/zmievsa/cadwyn/compare/7.3.0...7.4.0
Fix dependency update checks for ty and AnyIO deprecations by @zmievsa in https://github.com/zmievsa/cadwyn/pull/406
Full Changelog: https://github.com/zmievsa/cadwyn/compare/7.2.0...7.3.0
classmethod binding of @field_serializer decorators during model generation. Previously, such serializers were re-registered as instance methods, shifting their arguments by one and raising PydanticSerializationError on every serialization.Deprecate changelog generation by @zmievsa in https://github.com/zmievsa/cadwyn/pull/402
Full Changelog: https://github.com/zmievsa/cadwyn/compare/7.1.2...7.2.0
GET /changelog endpoint, Cadwyn.generate_changelog(), cadwyn.hidden(), and the changelog_url and include_changelog_url_in_schema constructor arguments. The feature remains available for backwards compatibility.Clarify contributor setup commands by @zmievsa in https://github.com/zmievsa/cadwyn/pull/387
Full Changelog: https://github.com/zmievsa/cadwyn/compare/7.1.1...7.1.2
what, when, and expected convention and documented test organization (#397)Bump starlette from 1.2.1 to 1.3.1 in the uv group across 1 directory by @dependabot[bot] in https://github.com/zmievsa/cadwyn/pull/380
Full Changelog: https://github.com/zmievsa/cadwyn/compare/7.1.0...7.1.1
Improve documentation 19 by @Shigerman in https://github.com/zmievsa/cadwyn/pull/377
Full Changelog: https://github.com/zmievsa/cadwyn/compare/7.0.0...7.1.0
Breaking change if you relied on lifespan running multiple times: Fix duplicated lifecycle callbacks in Cadwyn routers by @zmievsa in https://github.c…
Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.2.2...7.0.0
Cadwyn.mount() routes, including StaticFiles, returning 404 instead of being served as unversioned routes (#374)Support disabling separate input and output schemas by @kouk in https://github.com/zmievsa/cadwyn/pull/369
Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.2.1...6.2.2
Bump requests from 2.32.5 to 2.33.0 in the uv group across 1 directory by @dependabot[bot] in https://github.com/zmievsa/cadwyn/pull/362
response_model not being respected on routes. Fixes #365 by @kouk in https://github.com/zmievsa/cadwyn/pull/366openapi_tags to only include tags used by served routes (#368)Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.2.0...6.2.1
openapi_tags to only include tags used by served routes (#368)response_model not being respected on routes (#365)Add support for overriding static assets for swagger/redoc
Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.1.1...6.2.0
swagger_js_url, swagger_css_url, swagger_favicon_url, redoc_js_url, and redoc_favicon_url parameters to Cadwyn for customizing docs static asset URLs (#361)Fix compatibility with starlette==1.0.0
Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.1.0...6.1.1
TemplateResponse(name, context) calling conventionAdd request.form data migration support by @zmievsa in https://github.com/zmievsa/cadwyn/pull/359
Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.0.4...6.1.0
form property to RequestInfo for reading and modifying multipart/form-encoded fields (strings and file uploads) inside convert_request_to_next_version_for handlers (#359)RouterPathParamsModifiedError when renaming path-versioned endpoints (#357)Resolve '__getitem__' requires a 'typing.Union' error by @ulgens in https://github.com/zmievsa/cadwyn/pull/336
'__getitem__' requires a 'typing.Union' error by @ulgens in https://github.com/zmievsa/cadwyn/pull/336Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.0.3...6.0.4
Depend leading to RecursionError in generate_versioned_routers by @Shigerman (#329)'__getitem__' requires a 'typing.Union' error by @ulgens (#336)http.cookies changes by @ulgens (#338)Tolerate FastAPI 0.128+ utils removal, restrict fastapi >= 0.128.6 by @shahar1 in https://github.com/zmievsa/cadwyn/pull/327
Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.0.2...6.0.3
Bump urllib3 from 2.6.2 to 2.6.3 in the uv group across 1 directory by @dependabot[bot] in https://github.com/zmievsa/cadwyn/pull/323
...has no attribute '__annotations__' error by @ulgens in https://github.com/zmievsa/cadwyn/pull/334Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.0.1...6.0.2
...has no attribute '__annotations__' error by @ulgens (#334)Improve documentation 12 by @Shigerman in https://github.com/zmievsa/cadwyn/pull/318
Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.0.0...6.0.1
from __future__ import annotations. Note that this introduces another problem in python 3.9 in the same case that is currently not yet solved (#321)Add support for fastapi>=0.128.0 by @zmievsa in https://github.com/zmievsa/cadwyn/pull/317
Full Changelog: https://github.com/zmievsa/cadwyn/compare/6.0.0.rc1...6.0.0
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.6.2...6.0.0.rc1
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.6.2...6.0.0.rc1
improve documentation-9 by @Shigerman in https://github.com/zmievsa/cadwyn/pull/307
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.6.1...5.6.2
_prepare_response_content may return Pydantic model instances instead of dicts, breaking response migrations (#314)Add support for generics by @EgorOnishchuk in https://github.com/zmievsa/cadwyn/pull/303
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.6.0...5.6.1
improve documentation-8 by @Shigerman in https://github.com/zmievsa/cadwyn/pull/299
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.5.0...5.6.0
Fix the OpenAPI schema bug in airflow
Fix the OpenAPI schema bug in airflow
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.5.0...5.5.1
Fix the rest of the issues from fastapi==0.119.0
Fix the rest of the issues from fastapi==0.119.0
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.4.5...5.5.0
Fix the OpenAPI schema bug in airflow
Fix the OpenAPI schema bug in airflow
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.4.5...5.4.6
Fix GenerateJsonSchema getting removed in latest fastapi release
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.4.4...5.4.5
Add support for classvars by @zmievsa in https://github.com/zmievsa/cadwyn/pull/292
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.4.3...5.4.4
Fix reported vulnerability by @zmievsa in https://github.com/zmievsa/cadwyn/pull/290
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.4.2...5.4.3
/docs and /redoc endpoints where the version parameter was not properly sanitized, allowing potential cross-site scripting attacksimprove text in docs by @Shigerman in https://github.com/zmievsa/cadwyn/pull/285
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.4.1...5.4.2
improve_text_in_readme by @Shigerman in https://github.com/zmievsa/cadwyn/pull/276
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.3.3...5.4.1
Add project favicon to docs by @c4chula in https://github.com/zmievsa/cadwyn/pull/275
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.3.2...5.3.3
Add support for pydantic_settings.BaseSettings in dependencies by @zmievsa (#250) Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.3.1...5.
pydantic_settings.BaseSettings in dependencies by @zmievsa (#250)
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.3.1...5.3.2Fix invalid content-length header with custom exception handlers (#273) by @zmievsa
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.3.0...5.3.1
Add the ability to customize the title and description of the api version parameter by @zmievsa in https://github.com/zmievsa/cadwyn/pull/274
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.2.2...5.3.0
api_version_title and api_version_description arguments to Cadwyn to allow customizing the API version parameter in the OpenAPI schemaFix invalid route path used in by path migrations by @zmievsa in https://github.com/zmievsa/cadwyn/pull/271
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.2.1...5.2.2
/docs return 404 after adding api_version_default_value #268 by @zmievsa in https://github.com/zmievsa/cadwyn/pull/269
/docs return 404 after adding api_version_default_value #268 by @zmievsa in https://github.com/zmievsa/cadwyn/pull/269Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.2.0...5.2.1
Fix two remaining uses of the old-style of declaring version changes by @ashb in https://github.com/zmievsa/cadwyn/pull/266
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.1.4...5.2.0
a bug where a custom HTTP exception was not being copied correctly so its unique properties are ignored
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.1.3...5.1.4
__doc__ attribute is now copied from the original enum to the generated enum
__doc__ attribute is now copied from the original enum to the generated enumpydantic.JsonValue and other typing_extensions.TypeAliasType instances)Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.1.2...5.1.3
Fix generator dependencies not being converted correctly and add cadwyn.current_dependency_solver by @zmievsa in https://github.com/zmievsa/cadwyn/pul
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.1.1...5.1.2
cadwyn.current_dependency_solver function to check whether cadwyn or FastAPI is currently solving dependencies. It can be used as a dependency for versioned endpoints like so: current_dependency_solver: Annotated[Literal["fastapi", "cadwyn"], Depends(current_dependency_solver)]. If your dependency has side effects, you would likely want to only run it once per request. If you want to run it once we migrated the request to the latest version, you should only run it when current_dependency_solver is "cadwyn". If you want your dependency to run at the very beginning of handling the request, you should only run it when current_dependency_solver is "fastapi".Copy field annotations when building versioned models with future annotations by @ashb in https://github.com/zmievsa/cadwyn/pull/257
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.1.0...5.1.1
Fix coverage by @zmievsa in https://github.com/zmievsa/cadwyn/pull/253
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.0.0...5.1.0
Fix coverage by @zmievsa in https://github.com/zmievsa/cadwyn/pull/253
Full Changelog: https://github.com/zmievsa/cadwyn/compare/5.0.0...5.1.0a1
## What's Changed * #251 add support for string versions and versions as URL path prefixes by @zmievsa in https://github.com/zmievsa/cadwyn/pull/252 F
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.6.0...5.0.0
api_version_location argument of cadwyn.Cadwyn.api_version_format argument of cadwyn.Cadwyn.VersionPickingMiddleware class that you can pass to the versioning_middleware_class argument of cadwyn.Cadwyn.api_version_default_value argument to cadwyn.Cadwyn to set a default version for unversioned requests. It can be a string or an async callable that returns a string.cadwyn.Version, cadwyn.VersionBundle, and cadwyn.VersionBundle.api_version_var now store versions as strings instead of dates. Date types can still be passed to cadwyn.Version but there is no guarantee that they will be supported in the future. However, ISO dates with a string type are guaranteed to be supported.api_version_header_name argument is now deprecated in favor of api_version_parameter_namecadwyn.Cadwyn.add_header_versioned_routers method is now deprecated in favor of cadwyn.Cadwyn.generate_and_include_versioned_routers. It will be removed in version 6.0.0## What's Changed * #251 : add support for string versions and versions as URL path prefixes by @zmievsa in https://github.com/zmievsa/cadwyn/pull/252
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.6.0...5.0.0a1
Fix: Route params (query or post) with future annotations gives "not fully defined" error #246 by @zmievsa in https://github.com/zmievsa/cadwyn/pull/2
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.5.0...4.6.0
schema.had() and schema.didnt_have(): field_title_generator, fail_fast, coerce_numbers_to_str, union_mode, allow_mutation, pattern, discriminatorfrom __future__ import annotations in the file with your routes)Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.5.0...4.6.0-alpha.1
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.5.0...4.6.0-alpha.1
Add check usage argument to converters by @zmievsa in https://github.com/zmievsa/cadwyn/pull/245
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.4.5...4.5.0
check_usage argument to request/response by schema converters. Cadwyn always checks whether a schema mentioned in a converter applies to one or more endpoints to guarantee that the converter will apply to at least one endpoint. Sometimes, however, you do not need this validation. For example, when you use these converters for converting webhook bodies. Setting check_usage=False makes it possible to skip the validationConfigure pytest to ignore known DeprecationWarnings by @kurtmckee in https://github.com/zmievsa/cadwyn/pull/233
actions/(upload|download)-artifact to v4 by @kurtmckee in https://github.com/zmievsa/cadwyn/pull/235actions/download-artifact@v4 by @kurtmckee in https://github.com/zmievsa/cadwyn/pull/238DeprecationWarnings by @kurtmckee in https://github.com/zmievsa/cadwyn/pull/233Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.4.3...4.4.5
Update packages by @zmievsa in https://github.com/zmievsa/cadwyn/pull/228
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.4.2...4.4.3
Fix dependency overrides for class instances by @zmievsa in https://github.com/zmievsa/cadwyn/pull/227
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.4.1...4.4.2
Add python 3.13 to CI and pypi by @zmievsa in https://github.com/zmievsa/cadwyn/pull/225
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.4.0...4.4.1
Separate tutorial tests in CI by @zmievsa in https://github.com/zmievsa/cadwyn/pull/222
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.3.1...4.4.0
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.3.0...4.3.1
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.3.0...4.3.1
[Dependencies] migrate from poetry to uv by @bastienpo in https://github.com/zmievsa/cadwyn/pull/219
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.2.4...4.3.0
standard extras group to mirror FastAPI (Contributed by @bastienpo)Add doctests by @zmievsa in https://github.com/zmievsa/cadwyn/pull/211
Full Changelog: https://github.com/zmievsa/cadwyn/compare/4.2.3...4.2.4
One column per quarter.