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_bodyandcadwyn.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.mainbecause it is replaced bycadwyn.__init__cadwyn.structure.moduleas it was only necessary in codegencadwyn.VersionBundle.latest_schemas_packageandcadwyn.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_routersas you can now simply use FastAPI'sinclude_routercadwyn.Cadwyn.add_unversioned_routesas you can now simply use any of FastAPI's methods for adding routes directly to the appcadwyn.Cadwyn.enrich_swaggeras its functionality has been automatedcadwyn.InternalRepresentationOfas it was deprecated previously and is now replaced with HeadVersion migrations
Changed
VersionBundle.migrate_response_bodyis no longer a method ofVersionBundleand is now importable directly fromcadwynas a functioncadwyn.structureis no longer recommended to be used directly because everything from it is now available incadwyndirectly
Full Changelog: 3.15.7...4.0.0