As discovered in 2309. If an application chooses to specify JsonStringEnumConverter for JsonSerializerOptions then enums which are implemented with the default serialization behaviour will result in unexpected behaviour.
We should consider enforcing serialization rules for these enums.
Go through all enums that we use for serialisation and ensure that they are annotated with JsonNumberEnumConverter so that global settings in apps don't apply
Write a test that searches all types in assemblies that have System.Text.Json.Serialization annotations specifies how to serialise enums with either string or number
Verify that swagger docs for enums actually reflects the serialisation strategy we use.
As discovered in 2309. If an application chooses to specify
JsonStringEnumConverter
forJsonSerializerOptions
then enums which are implemented with the default serialization behaviour will result in unexpected behaviour.We should consider enforcing serialization rules for these enums.