File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -680,6 +680,7 @@ def serialize_schema(self, model):
680680 return self .serialize_schema (model ())
681681
682682 elif isinstance (model , fields .Raw ):
683+ self .register_field (model )
683684 return model .__schema__
684685
685686 elif isinstance (model , (type , type (None ))) and model in PY_TYPES :
@@ -704,6 +705,12 @@ def register_model(self, model):
704705 return ref (model )
705706
706707 def register_field (self , field ):
708+ """
709+ Traverse a "container" field (`Nested`, `List`, `Wildcard`,
710+ and `Polymorph`) and register any nested models. Used for
711+ models nested inside other models or responses using fields
712+ for definition.
713+ """
707714 if isinstance (field , fields .Polymorph ):
708715 for model in field .mapping .values ():
709716 self .register_model (model )
You can’t perform that action at this time.
0 commit comments