json-schema-openc-fork 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +15 -0
  2. data/LICENSE.md +19 -0
  3. data/README.textile +452 -0
  4. data/lib/json-schema.rb +19 -0
  5. data/lib/json-schema/attribute.rb +43 -0
  6. data/lib/json-schema/attributes/additionalitems.rb +28 -0
  7. data/lib/json-schema/attributes/additionalproperties.rb +58 -0
  8. data/lib/json-schema/attributes/allof.rb +39 -0
  9. data/lib/json-schema/attributes/anyof.rb +47 -0
  10. data/lib/json-schema/attributes/dependencies.rb +44 -0
  11. data/lib/json-schema/attributes/disallow.rb +12 -0
  12. data/lib/json-schema/attributes/divisibleby.rb +22 -0
  13. data/lib/json-schema/attributes/enum.rb +24 -0
  14. data/lib/json-schema/attributes/extends.rb +50 -0
  15. data/lib/json-schema/attributes/format.rb +14 -0
  16. data/lib/json-schema/attributes/formats/custom.rb +21 -0
  17. data/lib/json-schema/attributes/formats/date.rb +24 -0
  18. data/lib/json-schema/attributes/formats/date_time.rb +36 -0
  19. data/lib/json-schema/attributes/formats/date_time_v4.rb +15 -0
  20. data/lib/json-schema/attributes/formats/ip.rb +41 -0
  21. data/lib/json-schema/attributes/formats/time.rb +22 -0
  22. data/lib/json-schema/attributes/formats/uri.rb +20 -0
  23. data/lib/json-schema/attributes/items.rb +26 -0
  24. data/lib/json-schema/attributes/limit.rb +179 -0
  25. data/lib/json-schema/attributes/maxdecimal.rb +18 -0
  26. data/lib/json-schema/attributes/multipleof.rb +11 -0
  27. data/lib/json-schema/attributes/not.rb +30 -0
  28. data/lib/json-schema/attributes/oneof.rb +56 -0
  29. data/lib/json-schema/attributes/pattern.rb +18 -0
  30. data/lib/json-schema/attributes/patternproperties.rb +22 -0
  31. data/lib/json-schema/attributes/properties.rb +74 -0
  32. data/lib/json-schema/attributes/properties_optional.rb +26 -0
  33. data/lib/json-schema/attributes/ref.rb +74 -0
  34. data/lib/json-schema/attributes/required.rb +28 -0
  35. data/lib/json-schema/attributes/type.rb +83 -0
  36. data/lib/json-schema/attributes/type_v4.rb +29 -0
  37. data/lib/json-schema/attributes/uniqueitems.rb +16 -0
  38. data/lib/json-schema/errors/custom_format_error.rb +6 -0
  39. data/lib/json-schema/errors/json_parse_error.rb +6 -0
  40. data/lib/json-schema/errors/schema_error.rb +6 -0
  41. data/lib/json-schema/errors/validation_error.rb +46 -0
  42. data/lib/json-schema/schema.rb +63 -0
  43. data/lib/json-schema/schema/reader.rb +113 -0
  44. data/lib/json-schema/schema/validator.rb +36 -0
  45. data/lib/json-schema/util/array_set.rb +14 -0
  46. data/lib/json-schema/util/uri.rb +16 -0
  47. data/lib/json-schema/util/uuid.rb +285 -0
  48. data/lib/json-schema/validator.rb +592 -0
  49. data/lib/json-schema/validators/draft1.rb +45 -0
  50. data/lib/json-schema/validators/draft2.rb +46 -0
  51. data/lib/json-schema/validators/draft3.rb +50 -0
  52. data/lib/json-schema/validators/draft4.rb +56 -0
  53. data/lib/json-schema/validators/hyper-draft4.rb +14 -0
  54. data/resources/draft-01.json +155 -0
  55. data/resources/draft-02.json +166 -0
  56. data/resources/draft-03.json +174 -0
  57. data/resources/draft-04.json +150 -0
  58. data/test/data/all_of_ref_data.json +3 -0
  59. data/test/data/any_of_ref_data.json +7 -0
  60. data/test/data/bad_data_1.json +3 -0
  61. data/test/data/good_data_1.json +3 -0
  62. data/test/data/one_of_ref_links_data.json +5 -0
  63. data/test/schemas/address_microformat.json +18 -0
  64. data/test/schemas/all_of_ref_base_schema.json +6 -0
  65. data/test/schemas/all_of_ref_schema.json +7 -0
  66. data/test/schemas/any_of_ref_jane_schema.json +4 -0
  67. data/test/schemas/any_of_ref_jimmy_schema.json +4 -0
  68. data/test/schemas/any_of_ref_john_schema.json +4 -0
  69. data/test/schemas/any_of_ref_schema.json +15 -0
  70. data/test/schemas/definition_schema.json +15 -0
  71. data/test/schemas/extends_and_additionalProperties-1-filename.schema.json +34 -0
  72. data/test/schemas/extends_and_additionalProperties-1-ref.schema.json +34 -0
  73. data/test/schemas/extends_and_additionalProperties-2-filename.schema.json +33 -0
  74. data/test/schemas/extends_and_additionalProperties-2-ref.schema.json +33 -0
  75. data/test/schemas/good_schema_1.json +10 -0
  76. data/test/schemas/good_schema_2.json +10 -0
  77. data/test/schemas/good_schema_extends1.json +10 -0
  78. data/test/schemas/good_schema_extends2.json +13 -0
  79. data/test/schemas/inner.schema.json +21 -0
  80. data/test/schemas/one_of_ref_links_schema.json +16 -0
  81. data/test/schemas/ref john with spaces schema.json +11 -0
  82. data/test/schemas/relative_definition_schema.json +8 -0
  83. data/test/schemas/self_link_schema.json +17 -0
  84. data/test/schemas/up_link_schema.json +17 -0
  85. data/test/test_all_of_ref_schema.rb +35 -0
  86. data/test/test_any_of_ref_schema.rb +35 -0
  87. data/test/test_bad_schema_ref.rb +39 -0
  88. data/test/test_common_test_suite.rb +66 -0
  89. data/test/test_custom_format.rb +116 -0
  90. data/test/test_definition.rb +15 -0
  91. data/test/test_extended_schema.rb +62 -0
  92. data/test/test_extends_and_additionalProperties.rb +52 -0
  93. data/test/test_files_v3.rb +43 -0
  94. data/test/test_fragment_resolution.rb +30 -0
  95. data/test/test_fragment_validation_with_ref.rb +34 -0
  96. data/test/test_full_validation.rb +208 -0
  97. data/test/test_helper.rb +47 -0
  98. data/test/test_initialize_data.rb +118 -0
  99. data/test/test_jsonschema_draft1.rb +171 -0
  100. data/test/test_jsonschema_draft2.rb +142 -0
  101. data/test/test_jsonschema_draft3.rb +502 -0
  102. data/test/test_jsonschema_draft4.rb +704 -0
  103. data/test/test_list_option.rb +21 -0
  104. data/test/test_merge_missing_values.rb +45 -0
  105. data/test/test_minitems.rb +16 -0
  106. data/test/test_one_of.rb +85 -0
  107. data/test/test_ruby_schema.rb +59 -0
  108. data/test/test_schema_loader.rb +74 -0
  109. data/test/test_schema_type_attribute.rb +20 -0
  110. data/test/test_schema_validation.rb +185 -0
  111. data/test/test_stringify.rb +48 -0
  112. data/test/test_uri_related.rb +67 -0
  113. data/test/test_validator.rb +53 -0
  114. metadata +284 -0
@@ -0,0 +1,45 @@
1
+ require 'json-schema/schema/validator'
2
+
3
+ module JSON
4
+ class Schema
5
+
6
+ class Draft1 < Validator
7
+ def initialize
8
+ super
9
+ @attributes = {
10
+ "type" => JSON::Schema::TypeAttribute,
11
+ "disallow" => JSON::Schema::DisallowAttribute,
12
+ "format" => JSON::Schema::FormatAttribute,
13
+ "maximum" => JSON::Schema::MaximumInclusiveAttribute,
14
+ "minimum" => JSON::Schema::MinimumInclusiveAttribute,
15
+ "minItems" => JSON::Schema::MinItemsAttribute,
16
+ "maxItems" => JSON::Schema::MaxItemsAttribute,
17
+ "minLength" => JSON::Schema::MinLengthAttribute,
18
+ "maxLength" => JSON::Schema::MaxLengthAttribute,
19
+ "maxDecimal" => JSON::Schema::MaxDecimalAttribute,
20
+ "enum" => JSON::Schema::EnumAttribute,
21
+ "properties" => JSON::Schema::PropertiesOptionalAttribute,
22
+ "pattern" => JSON::Schema::PatternAttribute,
23
+ "additionalProperties" => JSON::Schema::AdditionalPropertiesAttribute,
24
+ "items" => JSON::Schema::ItemsAttribute,
25
+ "extends" => JSON::Schema::ExtendsAttribute
26
+ }
27
+ @default_formats = {
28
+ 'date-time' => DateTimeFormat,
29
+ 'date' => DateFormat,
30
+ 'time' => TimeFormat,
31
+ 'ip-address' => IP4Format,
32
+ 'ipv6' => IP6Format,
33
+ 'uri' => UriFormat
34
+ }
35
+ @formats = @default_formats.clone
36
+ @uri = Addressable::URI.parse("http://json-schema.org/draft-01/schema#")
37
+ @names = ["draft1"]
38
+ @metaschema_name = "draft-01.json"
39
+ end
40
+
41
+ JSON::Validator.register_validator(self.new)
42
+ end
43
+
44
+ end
45
+ end
@@ -0,0 +1,46 @@
1
+ require 'json-schema/schema/validator'
2
+
3
+ module JSON
4
+ class Schema
5
+
6
+ class Draft2 < Validator
7
+ def initialize
8
+ super
9
+ @attributes = {
10
+ "type" => JSON::Schema::TypeAttribute,
11
+ "disallow" => JSON::Schema::DisallowAttribute,
12
+ "format" => JSON::Schema::FormatAttribute,
13
+ "maximum" => JSON::Schema::MaximumInclusiveAttribute,
14
+ "minimum" => JSON::Schema::MinimumInclusiveAttribute,
15
+ "minItems" => JSON::Schema::MinItemsAttribute,
16
+ "maxItems" => JSON::Schema::MaxItemsAttribute,
17
+ "uniqueItems" => JSON::Schema::UniqueItemsAttribute,
18
+ "minLength" => JSON::Schema::MinLengthAttribute,
19
+ "maxLength" => JSON::Schema::MaxLengthAttribute,
20
+ "divisibleBy" => JSON::Schema::DivisibleByAttribute,
21
+ "enum" => JSON::Schema::EnumAttribute,
22
+ "properties" => JSON::Schema::PropertiesOptionalAttribute,
23
+ "pattern" => JSON::Schema::PatternAttribute,
24
+ "additionalProperties" => JSON::Schema::AdditionalPropertiesAttribute,
25
+ "items" => JSON::Schema::ItemsAttribute,
26
+ "extends" => JSON::Schema::ExtendsAttribute
27
+ }
28
+ @default_formats = {
29
+ 'date-time' => DateTimeFormat,
30
+ 'date' => DateFormat,
31
+ 'time' => TimeFormat,
32
+ 'ip-address' => IP4Format,
33
+ 'ipv6' => IP6Format,
34
+ 'uri' => UriFormat
35
+ }
36
+ @formats = @default_formats.clone
37
+ @uri = Addressable::URI.parse("http://json-schema.org/draft-02/schema#")
38
+ @names = ["draft2"]
39
+ @metaschema_name = "draft-02.json"
40
+ end
41
+
42
+ JSON::Validator.register_validator(self.new)
43
+ end
44
+
45
+ end
46
+ end
@@ -0,0 +1,50 @@
1
+ require 'json-schema/schema/validator'
2
+
3
+ module JSON
4
+ class Schema
5
+
6
+ class Draft3 < Validator
7
+ def initialize
8
+ super
9
+ @attributes = {
10
+ "type" => JSON::Schema::TypeAttribute,
11
+ "disallow" => JSON::Schema::DisallowAttribute,
12
+ "format" => JSON::Schema::FormatAttribute,
13
+ "maximum" => JSON::Schema::MaximumAttribute,
14
+ "minimum" => JSON::Schema::MinimumAttribute,
15
+ "minItems" => JSON::Schema::MinItemsAttribute,
16
+ "maxItems" => JSON::Schema::MaxItemsAttribute,
17
+ "uniqueItems" => JSON::Schema::UniqueItemsAttribute,
18
+ "minLength" => JSON::Schema::MinLengthAttribute,
19
+ "maxLength" => JSON::Schema::MaxLengthAttribute,
20
+ "divisibleBy" => JSON::Schema::DivisibleByAttribute,
21
+ "enum" => JSON::Schema::EnumAttribute,
22
+ "properties" => JSON::Schema::PropertiesAttribute,
23
+ "pattern" => JSON::Schema::PatternAttribute,
24
+ "patternProperties" => JSON::Schema::PatternPropertiesAttribute,
25
+ "additionalProperties" => JSON::Schema::AdditionalPropertiesAttribute,
26
+ "items" => JSON::Schema::ItemsAttribute,
27
+ "additionalItems" => JSON::Schema::AdditionalItemsAttribute,
28
+ "dependencies" => JSON::Schema::DependenciesAttribute,
29
+ "extends" => JSON::Schema::ExtendsAttribute,
30
+ "$ref" => JSON::Schema::RefAttribute
31
+ }
32
+ @default_formats = {
33
+ 'date-time' => DateTimeFormat,
34
+ 'date' => DateFormat,
35
+ 'ip-address' => IP4Format,
36
+ 'ipv6' => IP6Format,
37
+ 'time' => TimeFormat,
38
+ 'uri' => UriFormat
39
+ }
40
+ @formats = @default_formats.clone
41
+ @uri = Addressable::URI.parse("http://json-schema.org/draft-03/schema#")
42
+ @names = ["draft3", "http://json-schema.org/draft-03/schema#"]
43
+ @metaschema_name = "draft-03.json"
44
+ end
45
+
46
+ JSON::Validator.register_validator(self.new)
47
+ end
48
+
49
+ end
50
+ end
@@ -0,0 +1,56 @@
1
+ require 'json-schema/schema/validator'
2
+
3
+ module JSON
4
+ class Schema
5
+
6
+ class Draft4 < Validator
7
+ def initialize
8
+ super
9
+ @attributes = {
10
+ "type" => JSON::Schema::TypeV4Attribute,
11
+ "allOf" => JSON::Schema::AllOfAttribute,
12
+ "anyOf" => JSON::Schema::AnyOfAttribute,
13
+ "oneOf" => JSON::Schema::OneOfAttribute,
14
+ "not" => JSON::Schema::NotAttribute,
15
+ "disallow" => JSON::Schema::DisallowAttribute,
16
+ "format" => JSON::Schema::FormatAttribute,
17
+ "maximum" => JSON::Schema::MaximumAttribute,
18
+ "minimum" => JSON::Schema::MinimumAttribute,
19
+ "minItems" => JSON::Schema::MinItemsAttribute,
20
+ "maxItems" => JSON::Schema::MaxItemsAttribute,
21
+ "minProperties" => JSON::Schema::MinPropertiesAttribute,
22
+ "maxProperties" => JSON::Schema::MaxPropertiesAttribute,
23
+ "uniqueItems" => JSON::Schema::UniqueItemsAttribute,
24
+ "minLength" => JSON::Schema::MinLengthAttribute,
25
+ "maxLength" => JSON::Schema::MaxLengthAttribute,
26
+ "multipleOf" => JSON::Schema::MultipleOfAttribute,
27
+ "enum" => JSON::Schema::EnumAttribute,
28
+ "properties" => JSON::Schema::PropertiesV4Attribute,
29
+ "required" => JSON::Schema::RequiredAttribute,
30
+ "pattern" => JSON::Schema::PatternAttribute,
31
+ "patternProperties" => JSON::Schema::PatternPropertiesAttribute,
32
+ "additionalProperties" => JSON::Schema::AdditionalPropertiesAttribute,
33
+ "items" => JSON::Schema::ItemsAttribute,
34
+ "additionalItems" => JSON::Schema::AdditionalItemsAttribute,
35
+ "dependencies" => JSON::Schema::DependenciesV4Attribute,
36
+ "extends" => JSON::Schema::ExtendsAttribute,
37
+ "$ref" => JSON::Schema::RefAttribute
38
+ }
39
+ @default_formats = {
40
+ 'date-time' => DateTimeV4Format,
41
+ 'ipv4' => IP4Format,
42
+ 'ipv6' => IP6Format,
43
+ 'uri' => UriFormat
44
+ }
45
+ @formats = @default_formats.clone
46
+ @uri = Addressable::URI.parse("http://json-schema.org/draft-04/schema#")
47
+ @names = ["draft4", "http://json-schema.org/draft-04/schema#"]
48
+ @metaschema_name = "draft-04.json"
49
+ end
50
+
51
+ JSON::Validator.register_validator(self.new)
52
+ JSON::Validator.register_default_validator(self.new)
53
+ end
54
+
55
+ end
56
+ end
@@ -0,0 +1,14 @@
1
+ module JSON
2
+ class Schema
3
+
4
+ class HyperDraft4 < Draft4
5
+ def initialize
6
+ super
7
+ @uri = Addressable::URI.parse("http://json-schema.org/draft-04/hyper-schema#")
8
+ end
9
+
10
+ JSON::Validator.register_validator(self.new)
11
+ JSON::Validator.register_default_validator(self.new)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,155 @@
1
+ {
2
+ "$schema" : "http://json-schema.org/draft-01/hyper-schema#",
3
+ "id" : "http://json-schema.org/draft-01/schema#",
4
+ "type" : "object",
5
+
6
+ "properties" : {
7
+ "type" : {
8
+ "type" : ["string", "array"],
9
+ "items" : {
10
+ "type" : ["string", {"$ref" : "#"}]
11
+ },
12
+ "optional" : true,
13
+ "default" : "any"
14
+ },
15
+
16
+ "properties" : {
17
+ "type" : "object",
18
+ "additionalProperties" : {"$ref" : "#"},
19
+ "optional" : true,
20
+ "default" : {}
21
+ },
22
+
23
+ "items" : {
24
+ "type" : [{"$ref" : "#"}, "array"],
25
+ "items" : {"$ref" : "#"},
26
+ "optional" : true,
27
+ "default" : {}
28
+ },
29
+
30
+ "optional" : {
31
+ "type" : "boolean",
32
+ "optional" : true,
33
+ "default" : false
34
+ },
35
+
36
+ "additionalProperties" : {
37
+ "type" : [{"$ref" : "#"}, "boolean"],
38
+ "optional" : true,
39
+ "default" : {}
40
+ },
41
+
42
+ "requires" : {
43
+ "type" : ["string", {"$ref" : "#"}],
44
+ "optional" : true
45
+ },
46
+
47
+ "minimum" : {
48
+ "type" : "number",
49
+ "optional" : true
50
+ },
51
+
52
+ "maximum" : {
53
+ "type" : "number",
54
+ "optional" : true
55
+ },
56
+
57
+ "minimumCanEqual" : {
58
+ "type" : "boolean",
59
+ "optional" : true,
60
+ "requires" : "minimum",
61
+ "default" : true
62
+ },
63
+
64
+ "maximumCanEqual" : {
65
+ "type" : "boolean",
66
+ "optional" : true,
67
+ "requires" : "maximum",
68
+ "default" : true
69
+ },
70
+
71
+ "minItems" : {
72
+ "type" : "integer",
73
+ "optional" : true,
74
+ "minimum" : 0,
75
+ "default" : 0
76
+ },
77
+
78
+ "maxItems" : {
79
+ "type" : "integer",
80
+ "optional" : true,
81
+ "minimum" : 0
82
+ },
83
+
84
+ "pattern" : {
85
+ "type" : "string",
86
+ "optional" : true,
87
+ "format" : "regex"
88
+ },
89
+
90
+ "minLength" : {
91
+ "type" : "integer",
92
+ "optional" : true,
93
+ "minimum" : 0,
94
+ "default" : 0
95
+ },
96
+
97
+ "maxLength" : {
98
+ "type" : "integer",
99
+ "optional" : true
100
+ },
101
+
102
+ "enum" : {
103
+ "type" : "array",
104
+ "optional" : true,
105
+ "minItems" : 1
106
+ },
107
+
108
+ "title" : {
109
+ "type" : "string",
110
+ "optional" : true
111
+ },
112
+
113
+ "description" : {
114
+ "type" : "string",
115
+ "optional" : true
116
+ },
117
+
118
+ "format" : {
119
+ "type" : "string",
120
+ "optional" : true
121
+ },
122
+
123
+ "contentEncoding" : {
124
+ "type" : "string",
125
+ "optional" : true
126
+ },
127
+
128
+ "default" : {
129
+ "type" : "any",
130
+ "optional" : true
131
+ },
132
+
133
+ "maxDecimal" : {
134
+ "type" : "integer",
135
+ "optional" : true,
136
+ "minimum" : 0
137
+ },
138
+
139
+ "disallow" : {
140
+ "type" : ["string", "array"],
141
+ "items" : {"type" : "string"},
142
+ "optional" : true
143
+ },
144
+
145
+ "extends" : {
146
+ "type" : [{"$ref" : "#"}, "array"],
147
+ "items" : {"$ref" : "#"},
148
+ "optional" : true,
149
+ "default" : {}
150
+ }
151
+ },
152
+
153
+ "optional" : true,
154
+ "default" : {}
155
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "$schema" : "http://json-schema.org/draft-02/hyper-schema#",
3
+ "id" : "http://json-schema.org/draft-02/schema#",
4
+ "type" : "object",
5
+
6
+ "properties" : {
7
+ "type" : {
8
+ "type" : ["string", "array"],
9
+ "items" : {
10
+ "type" : ["string", {"$ref" : "#"}]
11
+ },
12
+ "optional" : true,
13
+ "uniqueItems" : true,
14
+ "default" : "any"
15
+ },
16
+
17
+ "properties" : {
18
+ "type" : "object",
19
+ "additionalProperties" : {"$ref" : "#"},
20
+ "optional" : true,
21
+ "default" : {}
22
+ },
23
+
24
+ "items" : {
25
+ "type" : [{"$ref" : "#"}, "array"],
26
+ "items" : {"$ref" : "#"},
27
+ "optional" : true,
28
+ "default" : {}
29
+ },
30
+
31
+ "optional" : {
32
+ "type" : "boolean",
33
+ "optional" : true,
34
+ "default" : false
35
+ },
36
+
37
+ "additionalProperties" : {
38
+ "type" : [{"$ref" : "#"}, "boolean"],
39
+ "optional" : true,
40
+ "default" : {}
41
+ },
42
+
43
+ "requires" : {
44
+ "type" : ["string", {"$ref" : "#"}],
45
+ "optional" : true
46
+ },
47
+
48
+ "minimum" : {
49
+ "type" : "number",
50
+ "optional" : true
51
+ },
52
+
53
+ "maximum" : {
54
+ "type" : "number",
55
+ "optional" : true
56
+ },
57
+
58
+ "minimumCanEqual" : {
59
+ "type" : "boolean",
60
+ "optional" : true,
61
+ "requires" : "minimum",
62
+ "default" : true
63
+ },
64
+
65
+ "maximumCanEqual" : {
66
+ "type" : "boolean",
67
+ "optional" : true,
68
+ "requires" : "maximum",
69
+ "default" : true
70
+ },
71
+
72
+ "minItems" : {
73
+ "type" : "integer",
74
+ "optional" : true,
75
+ "minimum" : 0,
76
+ "default" : 0
77
+ },
78
+
79
+ "maxItems" : {
80
+ "type" : "integer",
81
+ "optional" : true,
82
+ "minimum" : 0
83
+ },
84
+
85
+ "uniqueItems" : {
86
+ "type" : "boolean",
87
+ "optional" : true,
88
+ "default" : false
89
+ },
90
+
91
+ "pattern" : {
92
+ "type" : "string",
93
+ "optional" : true,
94
+ "format" : "regex"
95
+ },
96
+
97
+ "minLength" : {
98
+ "type" : "integer",
99
+ "optional" : true,
100
+ "minimum" : 0,
101
+ "default" : 0
102
+ },
103
+
104
+ "maxLength" : {
105
+ "type" : "integer",
106
+ "optional" : true
107
+ },
108
+
109
+ "enum" : {
110
+ "type" : "array",
111
+ "optional" : true,
112
+ "minItems" : 1,
113
+ "uniqueItems" : true
114
+ },
115
+
116
+ "title" : {
117
+ "type" : "string",
118
+ "optional" : true
119
+ },
120
+
121
+ "description" : {
122
+ "type" : "string",
123
+ "optional" : true
124
+ },
125
+
126
+ "format" : {
127
+ "type" : "string",
128
+ "optional" : true
129
+ },
130
+
131
+ "contentEncoding" : {
132
+ "type" : "string",
133
+ "optional" : true
134
+ },
135
+
136
+ "default" : {
137
+ "type" : "any",
138
+ "optional" : true
139
+ },
140
+
141
+ "divisibleBy" : {
142
+ "type" : "number",
143
+ "minimum" : 0,
144
+ "minimumCanEqual" : false,
145
+ "optional" : true,
146
+ "default" : 1
147
+ },
148
+
149
+ "disallow" : {
150
+ "type" : ["string", "array"],
151
+ "items" : {"type" : "string"},
152
+ "optional" : true,
153
+ "uniqueItems" : true
154
+ },
155
+
156
+ "extends" : {
157
+ "type" : [{"$ref" : "#"}, "array"],
158
+ "items" : {"$ref" : "#"},
159
+ "optional" : true,
160
+ "default" : {}
161
+ }
162
+ },
163
+
164
+ "optional" : true,
165
+ "default" : {}
166
+ }