Skip to content

Commit

Permalink
Lenght => Length (Azure#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-xia authored and Derich367 committed Jan 30, 2023
1 parent 8a3de26 commit 00df753
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,13 +520,13 @@ private static void ApplyStringLengthAttribute(OpenApiSchema schema, StringLengt

private static void ApplyRequiredAttribute(OpenApiSchema schema, RequiredAttribute requiredAttribute)
{
if (schema.Type == "string" && !requiredAttribute.AllowEmptyStrings && !IsMinLenghtSet(schema))
if (schema.Type == "string" && !requiredAttribute.AllowEmptyStrings && !IsMinLengthSet(schema))
{
schema.MinLength = 1;
}
}

private static bool IsMinLenghtSet(OpenApiSchema schema)
private static bool IsMinLengthSet(OpenApiSchema schema)
{
return schema.MinLength != null && schema.MinLength > 0;
}
Expand Down

0 comments on commit 00df753

Please sign in to comment.