RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

There is no way to test if a type is yaml serializable

Open ElectroJr opened this issue 2 months ago • 0 comments

There's currently no easy way to validate whether a type is yaml serializable, which prevents us from writing some test or analyzer that checks whether data fields are actually serializable. #5578 added a bandaid NotYamlSerializable attribute for blacklisting specific types, but that should be replaced with a proper test. Adding proper validation probably requires refactoring yaml serialisers so that they have something similar to NetSerializer.ITypeSerializer.GetSubtypes, where all serializers are forced to specify all sub-types that they depend which also need to be serializable.

ElectroJr avatar Oct 14 '25 07:10 ElectroJr