You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using MinLenght ro MaxLenght DataAnnotation attributes, no minLenght or maxLenght schema properties are being generated
EXPECTED RESULT:
minLenght, maxLenght are in schema
ADDITIONAL DETAILS
it would be enough if you would add
if (attribute is MaxLengthAttribute maxLength)
{
schema.maxLength = maxLength.Length;
}
if (attribute is MinLengthAttribute minLength)
{
schema.minLength = minLength.Length;
}
to your Swashbuckle.Core/Swagger/SchemaExtensions.cs - WithValidationProperties
but you would have to update .NET framework to 4.5 as in this pr: #1302
The text was updated successfully, but these errors were encountered:
STEPS TO REPRODUCE:
EXPECTED RESULT:
ADDITIONAL DETAILS
to your Swashbuckle.Core/Swagger/SchemaExtensions.cs - WithValidationProperties
but you would have to update .NET framework to 4.5 as in this pr: #1302
The text was updated successfully, but these errors were encountered: