4.0.0
What's Changed
Versions 3.x.x are still supported in terms of bug and security fixes but all the new features will go into versions 4.x.x.
Added
- Runtime schema/enum generation
- Support for versions as ISO date strings instead of dates in
cadwyn.migrate_response_body
andcadwyn.Version
Removed
- Pydantic 1 support
- Code generation from everywhere. It is now completely replaced by runtime generation (so schemas/enums are generated in the same manner as endpoints). This allows Cadwyn to version things outside of your project and allows you to pick any project structure unlike codegen that required a single "head" directory with all the versioned modules.
- CLI commands for codegen
cadwyn.main
because it is replaced bycadwyn.__init__
cadwyn.structure.module
as it was only necessary in codegencadwyn.VersionBundle.latest_schemas_package
andcadwyn.VersionBundle.head_schemas_package
,cadwyn.VersionBundle.versioned_modules
,cadwyn.VersionBundle.versioned_directories_with_head
,cadwyn.VersionBundle.versioned_directories_without_head
, because they were only necessary in code generationcadwyn.Cadwyn.add_unversioned_routers
as you can now simply use FastAPI'sinclude_router
cadwyn.Cadwyn.add_unversioned_routes
as you can now simply use any of FastAPI's methods for adding routes directly to the appcadwyn.Cadwyn.enrich_swagger
as its functionality has been automatedcadwyn.InternalRepresentationOf
as it was deprecated previously and is now replaced with HeadVersion migrations
Changed
VersionBundle.migrate_response_body
is no longer a method ofVersionBundle
and is now importable directly fromcadwyn
as a functioncadwyn.structure
is no longer recommended to be used directly because everything from it is now available incadwyn
directly
Full Changelog: 3.15.7...4.0.0