lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb in adiwg-mdtranslator-0.12.1 vs lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb in adiwg-mdtranslator-1.0.0rc1
- old
+ new
@@ -9,11 +9,11 @@
# Stan Smith 2014-12-03 changed class name to MdJsonValidation from AdiwgJsonValidation
# Stan Smith 2014-12-11 added namespace
require 'json'
require 'json-schema'
-require 'adiwg-json_schemas'
+require 'adiwg-mdjson_schemas'
# temporary json-schema patch
# waiting for rubygem json-schema patch
require 'adiwg/mdtranslator/readers/mdJson/validator.rb'
module ADIWG
@@ -24,10 +24,10 @@
# validate json against the adiwg-json_schemas
# only one schema version is supported at this time
def self.validate(file)
begin
- schema = ADIWG::JsonSchemas::Utils.schema_path
+ schema = ADIWG::MdjsonSchemas::Utils.schema_path
aValErrs = Array.new
if $response[:readerValidationLevel] == 'strict'
aValErrs = JSON::Validator.fully_validate(schema, file, :strict => true, :errors_as_objects => true)
elsif $response[:readerValidationLevel] == 'normal'
aValErrs = JSON::Validator.fully_validate(schema, file, :errors_as_objects => true)