Closed Panaetius closed 2 years ago
Currently, marshmallow settings like unknown = INCLUDE are ignored when set in the Meta of a class using JsonLDAnnotation.
unknown = INCLUDE
Additionally, there is no way to set hooks like @pre_load for classes using JsonLDAnnotation.
@pre_load
We should add support for both, so the following should work:
class User(metaclass=JsonLDAnnotation): _id = fields.Id() name = fields.String(schema.name) class Meta: rdf_type = schema.User unknown = INCLUDE @pre_load def _preload(self, in_data, **kwargs): # modify in_data return in_data
Currently, marshmallow settings like
unknown = INCLUDE
are ignored when set in the Meta of a class using JsonLDAnnotation.Additionally, there is no way to set hooks like
@pre_load
for classes using JsonLDAnnotation.We should add support for both, so the following should work: