I am using Swashbuckle 5 in my ASP.NET webapi project with all default settings. It serializes my method\'s output in order to show me schema of the reply. I am getting docu
Add this to WebApiConfig.cs
:
config.Formatters.JsonFormatter.SerializerSettings.ContractResolver =
new DefaultContractResolver { IgnoreSerializableAttribute = true };
This resolves the issue for classes marked with [Serializable]
. I also have intermittent problems even if no classes have that attribute, so I always use this setting now.