Open
Description
I think we have been suffering from the missing JSON property for a while. #9177 is a good example. To avoid this happening in the future, I think we need a sort of automated testing system. The system should be able to automatically pick up all objects having a constructor annotated with @JsonCreator
and perform the serde testing. One hard thing here is we don't know what data should be provided for testing. I think One possible approach would be:
- Adding a new requirement that the author should add a new class for the serde testing. The class name should be formatted to be easily recognized by our unit testing system such as
{$ObjectName}SerdeTest
when we add a new JSON-serializable object. Also we need to add an abstract class which requires to implementgetData()
to return data for the serde testing. The abstract class checks for all JSON-serializable objects whether there is a corresponding unit test class. If it finds the valid test class, it performs all required testing. Otherwise returns an error.
Welcome any idea.