private void ValidateEndObject(JsonSchemaModel schema)
{
if (schema == null)
{
return;
}
Dictionary<string, bool> requiredProperties = _currentScope.RequiredProperties;
if (requiredProperties != null)
{
List<string> unmatchedRequiredProperties =
requiredProperties.Where(kv => !kv.Value).Select(kv => kv.Key).ToList();
if (unmatchedRequiredProperties.Count > 0)
{
RaiseError("Required properties are missing from object: {0}.".FormatWith(CultureInfo.InvariantCulture, string.Join(", ", unmatchedRequiredProperties.ToArray())), schema);
}
}
}