core/rails/app/models/attrib.rb
# Returns an array of schema validation errors.
# If the array is empty, the validation passed.
# Fragment must be a string full of YAML.
Returns an array of schema validation errors.
If the array is empty, the validation passed.
Fragment must be a string full of YAML.
Returns an array of schema validation errors . If the array is empty the validation passed . Fragment must be a string full of YAML .
def validate_schema(fragment)
    Rails.logger.info("Attrib: Validating schema for #{name}")
    test_schema = wrap_schema(fragment)
    Rails.logger.info("Attrib: #{name}: Schema:\n#{test_schema.to_yaml}")
    validator = Kwalify::MetaValidator.instance
    schema_errors = validator.validate(test_schema)
    Rails.logger.info("Attrib: Schema validation for #{name} passed.") if schema_errors.empty?
    schema_errors
  end
def validate_schema ( fragment ) Rails . logger . info ( "Attrib: Validating schema for #{name}" ) test_schema = wrap_schema ( fragment ) Rails . logger . info ( "Attrib: #{name}: Schema:\n#{test_schema.to_yaml}" ) validator = Kwalify :: MetaValidator . instance schema_errors = validator . validate ( test_schema ) Rails . logger . info ( "Attrib: Schema validation for #{name} passed." ) if schema_errors . empty? schema_errors end
Returns an array of schema validation errors.
Returns an array of schema validation errors .
fragment
<not_specific>