Sha256: 5666b6ad97b2726860110ca4f602ba1abe1d4af8432c833a0d030fd8ebed8ea3

Contents?: true

Size: 430 Bytes

Versions: 15

Compression:

Stored size: 430 Bytes

Contents

module JSON
  class Schema
    class ExtendsAttribute < Attribute
      def self.validate(current_schema, data, fragments, validator, options = {})
        schemas = current_schema.schema['extends']
        schemas = [schemas] if !schemas.is_a?(Array)
        schemas.each do |s|
          schema = JSON::Schema.new(s,current_schema.uri,validator)
          schema.validate(data, fragments)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
json-schema-0.9.12 lib/json-schema/attributes/extends.rb
json-schema-0.9.11 lib/json-schema/attributes/extends.rb
json-schema-0.9.10 lib/json-schema/attributes/extends.rb
json-schema-0.9.9 lib/json-schema/attributes/extends.rb
json-schema-0.9.8 lib/json-schema/attributes/extends.rb
json-schema-0.9.7 lib/json-schema/attributes/extends.rb
json-schema-0.9.6 lib/json-schema/attributes/extends.rb
json-schema-0.9.5 lib/json-schema/attributes/extends.rb
json-schema-0.9.4 lib/json-schema/attributes/extends.rb
json-schema-0.9.3 lib/json-schema/attributes/extends.rb
json-schema-0.9.2 lib/json-schema/attributes/extends.rb
json-schema-0.9.1 lib/json-schema/attributes/extends.rb
json-schema-0.9.0 lib/json-schema/attributes/extends.rb
json-schema-0.2.0 lib/json-schema/attributes/extends.rb
json-schema-0.1.14 lib/json-schema/attributes/extends.rb