jsi 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/CHANGELOG.md +15 -0
  4. data/README.md +105 -38
  5. data/lib/jsi/base.rb +349 -155
  6. data/lib/jsi/jsi_coder.rb +5 -4
  7. data/lib/jsi/metaschema_node/bootstrap_schema.rb +100 -0
  8. data/lib/jsi/metaschema_node.rb +156 -129
  9. data/lib/jsi/pathed_node.rb +47 -49
  10. data/lib/jsi/ptr.rb +292 -0
  11. data/lib/jsi/schema/application/child_application/contains.rb +16 -0
  12. data/lib/jsi/schema/application/child_application/draft04.rb +22 -0
  13. data/lib/jsi/schema/application/child_application/draft06.rb +29 -0
  14. data/lib/jsi/schema/application/child_application/draft07.rb +29 -0
  15. data/lib/jsi/schema/application/child_application/items.rb +18 -0
  16. data/lib/jsi/schema/application/child_application/properties.rb +25 -0
  17. data/lib/jsi/schema/application/child_application.rb +40 -0
  18. data/lib/jsi/schema/application/draft04.rb +8 -0
  19. data/lib/jsi/schema/application/draft06.rb +8 -0
  20. data/lib/jsi/schema/application/draft07.rb +8 -0
  21. data/lib/jsi/schema/application/inplace_application/dependencies.rb +28 -0
  22. data/lib/jsi/schema/application/inplace_application/draft04.rb +26 -0
  23. data/lib/jsi/schema/application/inplace_application/draft06.rb +27 -0
  24. data/lib/jsi/schema/application/inplace_application/draft07.rb +33 -0
  25. data/lib/jsi/schema/application/inplace_application/ifthenelse.rb +20 -0
  26. data/lib/jsi/schema/application/inplace_application/ref.rb +18 -0
  27. data/lib/jsi/schema/application/inplace_application/someof.rb +29 -0
  28. data/lib/jsi/schema/application/inplace_application.rb +46 -0
  29. data/lib/jsi/schema/application.rb +12 -0
  30. data/lib/jsi/schema/draft04.rb +14 -0
  31. data/lib/jsi/schema/draft06.rb +14 -0
  32. data/lib/jsi/schema/draft07.rb +14 -0
  33. data/lib/jsi/schema/issue.rb +36 -0
  34. data/lib/jsi/schema/ref.rb +159 -0
  35. data/lib/jsi/schema/schema_ancestor_node.rb +119 -0
  36. data/lib/jsi/schema/validation/array.rb +69 -0
  37. data/lib/jsi/schema/validation/const.rb +20 -0
  38. data/lib/jsi/schema/validation/contains.rb +25 -0
  39. data/lib/jsi/schema/validation/core.rb +39 -0
  40. data/lib/jsi/schema/validation/dependencies.rb +49 -0
  41. data/lib/jsi/schema/validation/draft04/minmax.rb +91 -0
  42. data/lib/jsi/schema/validation/draft04.rb +112 -0
  43. data/lib/jsi/schema/validation/draft06.rb +122 -0
  44. data/lib/jsi/schema/validation/draft07.rb +159 -0
  45. data/lib/jsi/schema/validation/enum.rb +25 -0
  46. data/lib/jsi/schema/validation/ifthenelse.rb +46 -0
  47. data/lib/jsi/schema/validation/items.rb +54 -0
  48. data/lib/jsi/schema/validation/not.rb +20 -0
  49. data/lib/jsi/schema/validation/numeric.rb +121 -0
  50. data/lib/jsi/schema/validation/object.rb +45 -0
  51. data/lib/jsi/schema/validation/pattern.rb +34 -0
  52. data/lib/jsi/schema/validation/properties.rb +101 -0
  53. data/lib/jsi/schema/validation/property_names.rb +32 -0
  54. data/lib/jsi/schema/validation/ref.rb +40 -0
  55. data/lib/jsi/schema/validation/required.rb +27 -0
  56. data/lib/jsi/schema/validation/someof.rb +90 -0
  57. data/lib/jsi/schema/validation/string.rb +47 -0
  58. data/lib/jsi/schema/validation/type.rb +49 -0
  59. data/lib/jsi/schema/validation.rb +51 -0
  60. data/lib/jsi/schema.rb +486 -133
  61. data/lib/jsi/schema_classes.rb +157 -42
  62. data/lib/jsi/schema_registry.rb +141 -0
  63. data/lib/jsi/schema_set.rb +141 -0
  64. data/lib/jsi/simple_wrap.rb +2 -2
  65. data/lib/jsi/typelike_modules.rb +52 -37
  66. data/lib/jsi/util/attr_struct.rb +106 -0
  67. data/lib/jsi/util.rb +141 -25
  68. data/lib/jsi/validation/error.rb +34 -0
  69. data/lib/jsi/validation/result.rb +210 -0
  70. data/lib/jsi/validation.rb +15 -0
  71. data/lib/jsi/version.rb +3 -1
  72. data/lib/jsi.rb +55 -9
  73. data/lib/schemas/json-schema.org/draft-04/schema.rb +8 -3
  74. data/lib/schemas/json-schema.org/draft-06/schema.rb +8 -3
  75. data/lib/schemas/json-schema.org/draft-07/schema.rb +12 -0
  76. data/readme.rb +138 -0
  77. data/{resources}/schemas/json-schema.org/draft-04/schema.json +149 -0
  78. data/{resources}/schemas/json-schema.org/draft-06/schema.json +154 -0
  79. data/{resources}/schemas/json-schema.org/draft-07/schema.json +168 -0
  80. metadata +69 -118
  81. data/.simplecov +0 -3
  82. data/Rakefile.rb +0 -9
  83. data/jsi.gemspec +0 -28
  84. data/lib/jsi/base/to_rb.rb +0 -128
  85. data/lib/jsi/json/node.rb +0 -203
  86. data/lib/jsi/json/pointer.rb +0 -419
  87. data/lib/jsi/json-schema-fragments.rb +0 -61
  88. data/lib/jsi/json.rb +0 -10
  89. data/resources/icons/AGPL-3.0.png +0 -0
  90. data/test/base_array_test.rb +0 -323
  91. data/test/base_hash_test.rb +0 -337
  92. data/test/base_test.rb +0 -486
  93. data/test/jsi_coder_test.rb +0 -85
  94. data/test/jsi_json_arraynode_test.rb +0 -150
  95. data/test/jsi_json_hashnode_test.rb +0 -132
  96. data/test/jsi_json_node_test.rb +0 -257
  97. data/test/jsi_json_pointer_test.rb +0 -102
  98. data/test/jsi_test.rb +0 -11
  99. data/test/jsi_typelike_as_json_test.rb +0 -53
  100. data/test/metaschema_node_test.rb +0 -19
  101. data/test/schema_module_test.rb +0 -21
  102. data/test/schema_test.rb +0 -208
  103. data/test/spreedly_openapi_test.rb +0 -8
  104. data/test/test_helper.rb +0 -97
  105. data/test/util_test.rb +0 -62
@@ -0,0 +1,154 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-06/schema#",
3
+ "$id": "http://json-schema.org/draft-06/schema#",
4
+ "title": "Core schema meta-schema",
5
+ "definitions": {
6
+ "schemaArray": {
7
+ "type": "array",
8
+ "minItems": 1,
9
+ "items": { "$ref": "#" }
10
+ },
11
+ "nonNegativeInteger": {
12
+ "type": "integer",
13
+ "minimum": 0
14
+ },
15
+ "nonNegativeIntegerDefault0": {
16
+ "allOf": [
17
+ { "$ref": "#/definitions/nonNegativeInteger" },
18
+ { "default": 0 }
19
+ ]
20
+ },
21
+ "simpleTypes": {
22
+ "enum": [
23
+ "array",
24
+ "boolean",
25
+ "integer",
26
+ "null",
27
+ "number",
28
+ "object",
29
+ "string"
30
+ ]
31
+ },
32
+ "stringArray": {
33
+ "type": "array",
34
+ "items": { "type": "string" },
35
+ "uniqueItems": true,
36
+ "default": []
37
+ }
38
+ },
39
+ "type": ["object", "boolean"],
40
+ "properties": {
41
+ "$id": {
42
+ "type": "string",
43
+ "format": "uri-reference"
44
+ },
45
+ "$schema": {
46
+ "type": "string",
47
+ "format": "uri"
48
+ },
49
+ "$ref": {
50
+ "type": "string",
51
+ "format": "uri-reference"
52
+ },
53
+ "title": {
54
+ "type": "string"
55
+ },
56
+ "description": {
57
+ "type": "string"
58
+ },
59
+ "default": {},
60
+ "examples": {
61
+ "type": "array",
62
+ "items": {}
63
+ },
64
+ "multipleOf": {
65
+ "type": "number",
66
+ "exclusiveMinimum": 0
67
+ },
68
+ "maximum": {
69
+ "type": "number"
70
+ },
71
+ "exclusiveMaximum": {
72
+ "type": "number"
73
+ },
74
+ "minimum": {
75
+ "type": "number"
76
+ },
77
+ "exclusiveMinimum": {
78
+ "type": "number"
79
+ },
80
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
81
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
82
+ "pattern": {
83
+ "type": "string",
84
+ "format": "regex"
85
+ },
86
+ "additionalItems": { "$ref": "#" },
87
+ "items": {
88
+ "anyOf": [
89
+ { "$ref": "#" },
90
+ { "$ref": "#/definitions/schemaArray" }
91
+ ],
92
+ "default": {}
93
+ },
94
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
95
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
96
+ "uniqueItems": {
97
+ "type": "boolean",
98
+ "default": false
99
+ },
100
+ "contains": { "$ref": "#" },
101
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
102
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
103
+ "required": { "$ref": "#/definitions/stringArray" },
104
+ "additionalProperties": { "$ref": "#" },
105
+ "definitions": {
106
+ "type": "object",
107
+ "additionalProperties": { "$ref": "#" },
108
+ "default": {}
109
+ },
110
+ "properties": {
111
+ "type": "object",
112
+ "additionalProperties": { "$ref": "#" },
113
+ "default": {}
114
+ },
115
+ "patternProperties": {
116
+ "type": "object",
117
+ "additionalProperties": { "$ref": "#" },
118
+ "default": {}
119
+ },
120
+ "dependencies": {
121
+ "type": "object",
122
+ "additionalProperties": {
123
+ "anyOf": [
124
+ { "$ref": "#" },
125
+ { "$ref": "#/definitions/stringArray" }
126
+ ]
127
+ }
128
+ },
129
+ "propertyNames": { "$ref": "#" },
130
+ "const": {},
131
+ "enum": {
132
+ "type": "array",
133
+ "minItems": 1,
134
+ "uniqueItems": true
135
+ },
136
+ "type": {
137
+ "anyOf": [
138
+ { "$ref": "#/definitions/simpleTypes" },
139
+ {
140
+ "type": "array",
141
+ "items": { "$ref": "#/definitions/simpleTypes" },
142
+ "minItems": 1,
143
+ "uniqueItems": true
144
+ }
145
+ ]
146
+ },
147
+ "format": { "type": "string" },
148
+ "allOf": { "$ref": "#/definitions/schemaArray" },
149
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
150
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
151
+ "not": { "$ref": "#" }
152
+ },
153
+ "default": {}
154
+ }
@@ -0,0 +1,168 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Core schema meta-schema",
5
+ "definitions": {
6
+ "schemaArray": {
7
+ "type": "array",
8
+ "minItems": 1,
9
+ "items": { "$ref": "#" }
10
+ },
11
+ "nonNegativeInteger": {
12
+ "type": "integer",
13
+ "minimum": 0
14
+ },
15
+ "nonNegativeIntegerDefault0": {
16
+ "allOf": [
17
+ { "$ref": "#/definitions/nonNegativeInteger" },
18
+ { "default": 0 }
19
+ ]
20
+ },
21
+ "simpleTypes": {
22
+ "enum": [
23
+ "array",
24
+ "boolean",
25
+ "integer",
26
+ "null",
27
+ "number",
28
+ "object",
29
+ "string"
30
+ ]
31
+ },
32
+ "stringArray": {
33
+ "type": "array",
34
+ "items": { "type": "string" },
35
+ "uniqueItems": true,
36
+ "default": []
37
+ }
38
+ },
39
+ "type": ["object", "boolean"],
40
+ "properties": {
41
+ "$id": {
42
+ "type": "string",
43
+ "format": "uri-reference"
44
+ },
45
+ "$schema": {
46
+ "type": "string",
47
+ "format": "uri"
48
+ },
49
+ "$ref": {
50
+ "type": "string",
51
+ "format": "uri-reference"
52
+ },
53
+ "$comment": {
54
+ "type": "string"
55
+ },
56
+ "title": {
57
+ "type": "string"
58
+ },
59
+ "description": {
60
+ "type": "string"
61
+ },
62
+ "default": true,
63
+ "readOnly": {
64
+ "type": "boolean",
65
+ "default": false
66
+ },
67
+ "examples": {
68
+ "type": "array",
69
+ "items": true
70
+ },
71
+ "multipleOf": {
72
+ "type": "number",
73
+ "exclusiveMinimum": 0
74
+ },
75
+ "maximum": {
76
+ "type": "number"
77
+ },
78
+ "exclusiveMaximum": {
79
+ "type": "number"
80
+ },
81
+ "minimum": {
82
+ "type": "number"
83
+ },
84
+ "exclusiveMinimum": {
85
+ "type": "number"
86
+ },
87
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
88
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
89
+ "pattern": {
90
+ "type": "string",
91
+ "format": "regex"
92
+ },
93
+ "additionalItems": { "$ref": "#" },
94
+ "items": {
95
+ "anyOf": [
96
+ { "$ref": "#" },
97
+ { "$ref": "#/definitions/schemaArray" }
98
+ ],
99
+ "default": true
100
+ },
101
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
102
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
103
+ "uniqueItems": {
104
+ "type": "boolean",
105
+ "default": false
106
+ },
107
+ "contains": { "$ref": "#" },
108
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
109
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
110
+ "required": { "$ref": "#/definitions/stringArray" },
111
+ "additionalProperties": { "$ref": "#" },
112
+ "definitions": {
113
+ "type": "object",
114
+ "additionalProperties": { "$ref": "#" },
115
+ "default": {}
116
+ },
117
+ "properties": {
118
+ "type": "object",
119
+ "additionalProperties": { "$ref": "#" },
120
+ "default": {}
121
+ },
122
+ "patternProperties": {
123
+ "type": "object",
124
+ "additionalProperties": { "$ref": "#" },
125
+ "propertyNames": { "format": "regex" },
126
+ "default": {}
127
+ },
128
+ "dependencies": {
129
+ "type": "object",
130
+ "additionalProperties": {
131
+ "anyOf": [
132
+ { "$ref": "#" },
133
+ { "$ref": "#/definitions/stringArray" }
134
+ ]
135
+ }
136
+ },
137
+ "propertyNames": { "$ref": "#" },
138
+ "const": true,
139
+ "enum": {
140
+ "type": "array",
141
+ "items": true,
142
+ "minItems": 1,
143
+ "uniqueItems": true
144
+ },
145
+ "type": {
146
+ "anyOf": [
147
+ { "$ref": "#/definitions/simpleTypes" },
148
+ {
149
+ "type": "array",
150
+ "items": { "$ref": "#/definitions/simpleTypes" },
151
+ "minItems": 1,
152
+ "uniqueItems": true
153
+ }
154
+ ]
155
+ },
156
+ "format": { "type": "string" },
157
+ "contentMediaType": { "type": "string" },
158
+ "contentEncoding": { "type": "string" },
159
+ "if": { "$ref": "#" },
160
+ "then": { "$ref": "#" },
161
+ "else": { "$ref": "#" },
162
+ "allOf": { "$ref": "#/definitions/schemaArray" },
163
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
164
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
165
+ "not": { "$ref": "#" }
166
+ },
167
+ "default": true
168
+ }
metadata CHANGED
@@ -1,99 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-06 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: json-schema
14
+ name: addressable
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.8'
19
+ version: '2.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.8'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest-around
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: minitest-reporters
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: scorpio
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
26
+ version: '2.3'
97
27
  description: JSI offers an Object-Oriented representation for JSON data using JSON
98
28
  Schemas
99
29
  email:
@@ -102,49 +32,86 @@ executables: []
102
32
  extensions: []
103
33
  extra_rdoc_files: []
104
34
  files:
105
- - ".simplecov"
106
35
  - ".yardopts"
107
36
  - CHANGELOG.md
108
37
  - LICENSE.md
109
38
  - README.md
110
- - Rakefile.rb
111
- - jsi.gemspec
112
39
  - lib/jsi.rb
113
40
  - lib/jsi/base.rb
114
- - lib/jsi/base/to_rb.rb
115
41
  - lib/jsi/jsi_coder.rb
116
- - lib/jsi/json-schema-fragments.rb
117
- - lib/jsi/json.rb
118
- - lib/jsi/json/node.rb
119
- - lib/jsi/json/pointer.rb
120
42
  - lib/jsi/metaschema.rb
121
43
  - lib/jsi/metaschema_node.rb
44
+ - lib/jsi/metaschema_node/bootstrap_schema.rb
122
45
  - lib/jsi/pathed_node.rb
46
+ - lib/jsi/ptr.rb
123
47
  - lib/jsi/schema.rb
48
+ - lib/jsi/schema/application.rb
49
+ - lib/jsi/schema/application/child_application.rb
50
+ - lib/jsi/schema/application/child_application/contains.rb
51
+ - lib/jsi/schema/application/child_application/draft04.rb
52
+ - lib/jsi/schema/application/child_application/draft06.rb
53
+ - lib/jsi/schema/application/child_application/draft07.rb
54
+ - lib/jsi/schema/application/child_application/items.rb
55
+ - lib/jsi/schema/application/child_application/properties.rb
56
+ - lib/jsi/schema/application/draft04.rb
57
+ - lib/jsi/schema/application/draft06.rb
58
+ - lib/jsi/schema/application/draft07.rb
59
+ - lib/jsi/schema/application/inplace_application.rb
60
+ - lib/jsi/schema/application/inplace_application/dependencies.rb
61
+ - lib/jsi/schema/application/inplace_application/draft04.rb
62
+ - lib/jsi/schema/application/inplace_application/draft06.rb
63
+ - lib/jsi/schema/application/inplace_application/draft07.rb
64
+ - lib/jsi/schema/application/inplace_application/ifthenelse.rb
65
+ - lib/jsi/schema/application/inplace_application/ref.rb
66
+ - lib/jsi/schema/application/inplace_application/someof.rb
67
+ - lib/jsi/schema/draft04.rb
68
+ - lib/jsi/schema/draft06.rb
69
+ - lib/jsi/schema/draft07.rb
70
+ - lib/jsi/schema/issue.rb
71
+ - lib/jsi/schema/ref.rb
72
+ - lib/jsi/schema/schema_ancestor_node.rb
73
+ - lib/jsi/schema/validation.rb
74
+ - lib/jsi/schema/validation/array.rb
75
+ - lib/jsi/schema/validation/const.rb
76
+ - lib/jsi/schema/validation/contains.rb
77
+ - lib/jsi/schema/validation/core.rb
78
+ - lib/jsi/schema/validation/dependencies.rb
79
+ - lib/jsi/schema/validation/draft04.rb
80
+ - lib/jsi/schema/validation/draft04/minmax.rb
81
+ - lib/jsi/schema/validation/draft06.rb
82
+ - lib/jsi/schema/validation/draft07.rb
83
+ - lib/jsi/schema/validation/enum.rb
84
+ - lib/jsi/schema/validation/ifthenelse.rb
85
+ - lib/jsi/schema/validation/items.rb
86
+ - lib/jsi/schema/validation/not.rb
87
+ - lib/jsi/schema/validation/numeric.rb
88
+ - lib/jsi/schema/validation/object.rb
89
+ - lib/jsi/schema/validation/pattern.rb
90
+ - lib/jsi/schema/validation/properties.rb
91
+ - lib/jsi/schema/validation/property_names.rb
92
+ - lib/jsi/schema/validation/ref.rb
93
+ - lib/jsi/schema/validation/required.rb
94
+ - lib/jsi/schema/validation/someof.rb
95
+ - lib/jsi/schema/validation/string.rb
96
+ - lib/jsi/schema/validation/type.rb
124
97
  - lib/jsi/schema_classes.rb
98
+ - lib/jsi/schema_registry.rb
99
+ - lib/jsi/schema_set.rb
125
100
  - lib/jsi/simple_wrap.rb
126
101
  - lib/jsi/typelike_modules.rb
127
102
  - lib/jsi/util.rb
103
+ - lib/jsi/util/attr_struct.rb
104
+ - lib/jsi/validation.rb
105
+ - lib/jsi/validation/error.rb
106
+ - lib/jsi/validation/result.rb
128
107
  - lib/jsi/version.rb
129
108
  - lib/schemas/json-schema.org/draft-04/schema.rb
130
109
  - lib/schemas/json-schema.org/draft-06/schema.rb
131
- - resources/icons/AGPL-3.0.png
132
- - test/base_array_test.rb
133
- - test/base_hash_test.rb
134
- - test/base_test.rb
135
- - test/jsi_coder_test.rb
136
- - test/jsi_json_arraynode_test.rb
137
- - test/jsi_json_hashnode_test.rb
138
- - test/jsi_json_node_test.rb
139
- - test/jsi_json_pointer_test.rb
140
- - test/jsi_test.rb
141
- - test/jsi_typelike_as_json_test.rb
142
- - test/metaschema_node_test.rb
143
- - test/schema_module_test.rb
144
- - test/schema_test.rb
145
- - test/spreedly_openapi_test.rb
146
- - test/test_helper.rb
147
- - test/util_test.rb
110
+ - lib/schemas/json-schema.org/draft-07/schema.rb
111
+ - readme.rb
112
+ - "{resources}/schemas/json-schema.org/draft-04/schema.json"
113
+ - "{resources}/schemas/json-schema.org/draft-06/schema.json"
114
+ - "{resources}/schemas/json-schema.org/draft-07/schema.json"
148
115
  homepage: https://github.com/notEthan/jsi
149
116
  licenses:
150
117
  - AGPL-3.0
@@ -164,24 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
131
  - !ruby/object:Gem::Version
165
132
  version: '0'
166
133
  requirements: []
167
- rubygems_version: 3.0.6
134
+ rubygems_version: 3.1.2
168
135
  signing_key:
169
136
  specification_version: 4
170
137
  summary: 'JSI: JSON Schema Instantiation'
171
- test_files:
172
- - test/base_array_test.rb
173
- - test/base_hash_test.rb
174
- - test/base_test.rb
175
- - test/jsi_coder_test.rb
176
- - test/jsi_json_arraynode_test.rb
177
- - test/jsi_json_hashnode_test.rb
178
- - test/jsi_json_node_test.rb
179
- - test/jsi_json_pointer_test.rb
180
- - test/jsi_test.rb
181
- - test/jsi_typelike_as_json_test.rb
182
- - test/metaschema_node_test.rb
183
- - test/schema_module_test.rb
184
- - test/schema_test.rb
185
- - test/spreedly_openapi_test.rb
186
- - test/test_helper.rb
187
- - test/util_test.rb
138
+ test_files: []
data/.simplecov DELETED
@@ -1,3 +0,0 @@
1
- SimpleCov.start do
2
- coverage_dir '{coverage}'
3
- end
data/Rakefile.rb DELETED
@@ -1,9 +0,0 @@
1
- require "rake/testtask"
2
-
3
- Rake::TestTask.new(:test) do |t|
4
- t.libs << "test"
5
- t.libs << "lib"
6
- t.test_files = FileList["test/**/*_test.rb"]
7
- end
8
-
9
- task :default => :test
data/jsi.gemspec DELETED
@@ -1,28 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "jsi/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "jsi"
7
- spec.version = JSI::VERSION
8
- spec.authors = ["Ethan"]
9
- spec.email = ["ethan.jsi@unth.net"]
10
-
11
- spec.summary = "JSI: JSON Schema Instantiation"
12
- spec.description = "JSI offers an Object-Oriented representation for JSON data using JSON Schemas"
13
- spec.homepage = "https://github.com/notEthan/jsi"
14
- spec.license = "AGPL-3.0"
15
- ignore_files = %w(.gitignore .travis.yml Gemfile test)
16
- ignore_files_re = %r{\A(#{ignore_files.map { |f| Regexp.escape(f) }.join('|')})(/|\z)}
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(ignore_files_re) }
18
- spec.test_files = `git ls-files -z test`.split("\x0")
19
- spec.require_paths = ["lib"]
20
-
21
- # we are monkey patching json-schema with a fix that has not been merged in a timely fashion.
22
- spec.add_dependency "json-schema", "~> 2.8"
23
- spec.add_development_dependency "rake"
24
- spec.add_development_dependency "minitest"
25
- spec.add_development_dependency "minitest-around"
26
- spec.add_development_dependency "minitest-reporters"
27
- spec.add_development_dependency "scorpio"
28
- end