Class: Canvas::ValidCustomTypesCheck
- Defined in:
- lib/canvas/checks/valid_custom_types_check.rb
Overview
:documented: This check will validate the JSON objects that represent the custom types that are defined in the /types directory.
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
Methods inherited from Check
Constructor Details
This class inherits a constructor from Canvas::Check
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/canvas/checks/valid_custom_types_check.rb', line 8 def run custom_type_files.each do |filename| schema = extract_json(filename) validator = Validator::CustomType.new(schema: schema) next if validator.validate validator.errors.each do || @offenses << Offense.new( message: "Invalid Custom Type: #{filename} - \n#{}" ) end end end |