private void ValidateNotDisallowed(JsonSchemaModel schema)
{
if (schema == null)
{
return;
}
JsonSchemaType? currentNodeType = GetCurrentNodeSchemaType();
if (currentNodeType != null)
{
if (JsonSchemaGenerator.HasFlag(schema.Disallow, currentNodeType.GetValueOrDefault()))
{
RaiseError("Type {0} is disallowed.".FormatWith(CultureInfo.InvariantCulture, currentNodeType), schema);
}
}
}