The default_factory is a factory for generating the default value. For example, to get a default of [], the default_factory will be list.
Without calling the factory, the schema will be filled with, in this case, "<class: 'list'>". Whereas if you call the factory, the default will correctly be set to [].
The default_factory is a factory for generating the default value. For example, to get a default of
[]
, the default_factory will belist
.Without calling the factory, the schema will be filled with, in this case,
"<class: 'list'>"
. Whereas if you call the factory, the default will correctly be set to[]
.