Closed manuelmazzuola closed 3 years ago
Maybe I've resolved, added register_as_scheme
to ChildSchema.Meta
class.
What register_as_scheme
does?
It creates the field factory for the type and scheme in the registry provided to the scheme. There's an implicit registry that's used under the hood.
register_as_scheme
is documented in the Quickstart guide but is probably worth adding to the Customizing section as well.
register_as_scheme is documented in the Quickstart guide but is probably worth adding to the Customizing section as well.
:+1: , or maybe you can change the error from No field factory found for <class 'models.test.Child'>
to No field factory found for <class 'models.test.Child'>, forgot register_as_scheme attribute?
BTW, great job you did on this library :100: :+1:
Updated the error message and closed this issue. Sorry for the very late action on this :/ feel free to re-open this if it should be.
I'm stuck in nested attrs classes.
marshmallow-annotation==2.4.0
attrs==19.1.0
Given the following class:
I get the error:
marshmallow_annotations.exceptions.AnnotationConversionError: No field factory found for <class 'models.test.Child'>
whenDadSchema
is being parsed.Full stack trace:
Any help would be welcome :D Thanks