Class: JSON::Schema::Draft3
- Defined in:
- lib/json-schema/validators/draft3.rb
Instance Attribute Summary
Attributes inherited from Validator
Instance Method Summary collapse
-
#initialize ⇒ Draft3
constructor
A new instance of Draft3.
Methods inherited from Validator
#extend_schema_definition, #to_s, #validate
Constructor Details
#initialize ⇒ Draft3
Returns a new instance of Draft3.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/json-schema/validators/draft3.rb', line 5 def initialize super @attributes = { "type" => JSON::Schema::TypeAttribute, "disallow" => JSON::Schema::DisallowAttribute, "format" => JSON::Schema::FormatAttribute, "maximum" => JSON::Schema::MaximumAttribute, "minimum" => JSON::Schema::MinimumAttribute, "minItems" => JSON::Schema::MinItemsAttribute, "maxItems" => JSON::Schema::MaxItemsAttribute, "uniqueItems" => JSON::Schema::UniqueItemsAttribute, "minLength" => JSON::Schema::MinLengthAttribute, "maxLength" => JSON::Schema::MaxLengthAttribute, "divisibleBy" => JSON::Schema::DivisibleByAttribute, "enum" => JSON::Schema::EnumAttribute, "properties" => JSON::Schema::PropertiesAttribute, "pattern" => JSON::Schema::PatternAttribute, "patternProperties" => JSON::Schema::PatternPropertiesAttribute, "additionalProperties" => JSON::Schema::AdditionalPropertiesAttribute, "items" => JSON::Schema::ItemsAttribute, "additionalItems" => JSON::Schema::AdditionalItemsAttribute, "dependencies" => JSON::Schema::DependenciesAttribute, "extends" => JSON::Schema::ExtendsAttribute, "$ref" => JSON::Schema::RefAttribute } @uri = URI.parse("http://json-schema.org/draft-03/schema#") end |