Versioning tools for use with Django Rest Framework
Project description
Django Rest Framework Versioning
Work In Progress!
Todo:
- BUG: Allow multiple transforms per version -.-
- Version class
- Admin page for Versions (no editing, but just to view what is included in each version)
- Overridable Version class
- Version class to have methods to describe Transforms, ViewSets / views, etc
- FUTURE and PAST version singletons (?) that always "win" comparisons with normal Versions.
- This will allow marking features with introduced_in=Version.FUTURE, allowing release to be postponed till a later version. -VersionedSerializer
- Make VersionedSerializer work as inline serializer
- Needs to get context.request from parent probably
- Make VersionDoesNotExist a subclass of rest framework APIerror so views can handle it.
- The holy grail: get drf's openapi schema generator to listen to all this stuff.
- Cases for the transforms to handle (add your edge cases here!) (and examples in the docs):
- Field becomes required / nullable or reverse
- Add value to field choices (shouldn't appear in old schema)
- Add value to field schema and map to old value. E. G. Active / Failed -> Active /Failed / Retrying but for older versions Retrying should be displayed as Failed
Done:
- Have Transform, VersionedViewSet add themselves to Version's .transforms/.views attributes. (The reverse is pretty cumbersome to maintain)
- Hard(er) link between VersioningSerializer and its transforms
- Startup checks:
- VersioningSerializers have transform_base declared
- Add Versions for the versions of this repo :mind-blown:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for djangorestframework_versioning-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b483ebc01d817bc6546f6d2704fa4299ac5cfdf22e29391321d7870583f2517 |
|
MD5 | 6716a552904c2ab8fccbb7fa6fb5a24a |
|
BLAKE2b-256 | c88e7ec30eb1db683d12bddcf86369f34b8f9627284c7227caaaf6f8de5f2456 |
Close
Hashes for djangorestframework_versioning-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45621257c44a0ecf5b5b260372634fe2ca63a41559d5cd5a2fb900b934aaf3e6 |
|
MD5 | 621fbc1a3a762e158550ded9568dd7e6 |
|
BLAKE2b-256 | 33f1efcb4c9caac3837234b39df9fcdeb37217d2dec42db120766ca927918337 |