some code refactorings for WireMock.Net.OpenApiParser

This commit is contained in:
Stef Heyenrath
2021-11-21 10:07:27 +01:00
parent 48cfd2d20e
commit 8865543bf1
2 changed files with 9 additions and 6 deletions

View File

@@ -105,6 +105,7 @@ namespace WireMock.Net.OpenApiParser.Utils
}
}
}
private static IOpenApiAny GetRandomEnumValue(IList<IOpenApiAny> schemaEnum)
{
if (schemaEnum?.Count > 0)
@@ -113,7 +114,8 @@ namespace WireMock.Net.OpenApiParser.Utils
int randomEnum = new Random().Next(0, maxValue);
return schemaEnum[randomEnum];
}
return null;
}
}
}
}