I have dto with several fields
For example
public class SupplierModel
{
public string SupplierNameNormalized { get; set; }
public string PostalCode { get; set; }
public string City { get; set; }
}
I want to write attribute [MarkNonNullablePropertiesAsRequired] to mark all fields as required, so swagger can show them as required when project, launched.
I created class for attribute
[AttributeUsage(AttributeTargets.Class)]
public class MarkNonNullablePropertiesAsRequired: Attribute
{
}
How I can do this correctly and what I need to write inside class?