We found this issue when observed a ValidationError being thrown when serializing the response of an endpoint. The curiosity of this issue is that it happens in the compat.dump when all of these are true:
- There is a Nested field in a ResponseSchema with allow_none=True,
- The None value is used for that field.
- That field has a schema with required subfields (in this case it was an id str subfield without a default).
Then by reading the compat.dump code and the called functions, we've seen that setting dump_only=True on the Nested field served as a workaround.
More info:
This bug happens at least on version 3.2.0
We found this issue when observed a ValidationError being thrown when serializing the response of an endpoint. The curiosity of this issue is that it happens in the
compat.dumpwhen all of these are true:Then by reading the compat.dump code and the called functions, we've seen that setting
dump_only=Trueon the Nested field served as a workaround.More info:
This bug happens at least on version 3.2.0