I have a web API with the following model:
public class ParseLicenseRequest
{
public const string emptyStringDefault = "";
[Required(AllowEmptyStrings = false)]
public string LicenseKey { get; set; }
[DefaultValue(emptyStringDefault)]
public string Sid { get; set; } = emptyStringDefault;
public bool ShortFormat { get; set; }
}
When compiling the code, it looks like this in swagger:
I am trying to set the default value of sid to be empty:
"sid" : ""
However, it doesn't set the default value to empty.