Closed nharraud closed 6 years ago
@lnielsen this PR refactors the MarshmallowSerializer as a Mixin. If somebody wants to have a serializer without schemas they can implement their own transformation mixin. I can also transform all the other serializers as mixin.
The serializers still exist, they subclass all the necessary mixins. I transformed the JSON serializer as a mixin too. I can do the same for the other serializers if you want.
The classes should be mostly backward compatible.
Note that I also modified the link_factory use. It now receives all the parameters from the serializer. This avoids a problem we face in B2SHARE were we need the record metadata in order to generate some links. I think there is the same problem in Zenodo.
@slint I modified the create_blueprint function in order to wrap any old-signature links_factory. Can you take a look?
NEW Adds support for marshmallow context in MarshmallowMixin. (closes #110)
BETTER Refactors the serializers in order to make them work better as mixins.
Signed-off-by: Nicolas Harraudeau nicolas.harraudeau@cern.ch