jsi 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/LICENSE.md +613 -0
- data/README.md +62 -37
- data/jsi.gemspec +8 -12
- data/lib/jsi.rb +11 -0
- data/lib/jsi/base.rb +196 -258
- data/lib/jsi/base/to_rb.rb +2 -0
- data/lib/jsi/jsi_coder.rb +20 -15
- data/lib/jsi/json-schema-fragments.rb +2 -0
- data/lib/jsi/json.rb +2 -0
- data/lib/jsi/json/node.rb +45 -88
- data/lib/jsi/json/pointer.rb +102 -5
- data/lib/jsi/metaschema.rb +7 -0
- data/lib/jsi/metaschema_node.rb +217 -0
- data/lib/jsi/pathed_node.rb +5 -0
- data/lib/jsi/schema.rb +146 -169
- data/lib/jsi/schema_classes.rb +112 -47
- data/lib/jsi/simple_wrap.rb +8 -3
- data/lib/jsi/typelike_modules.rb +31 -39
- data/lib/jsi/util.rb +27 -47
- data/lib/jsi/version.rb +1 -1
- data/lib/schemas/json-schema.org/draft-04/schema.rb +7 -0
- data/lib/schemas/json-schema.org/draft-06/schema.rb +7 -0
- data/resources/icons/AGPL-3.0.png +0 -0
- data/test/base_array_test.rb +174 -60
- data/test/base_hash_test.rb +179 -46
- data/test/base_test.rb +163 -94
- data/test/jsi_coder_test.rb +14 -14
- data/test/jsi_json_arraynode_test.rb +10 -10
- data/test/jsi_json_hashnode_test.rb +14 -14
- data/test/jsi_json_node_test.rb +83 -136
- data/test/jsi_typelike_as_json_test.rb +1 -1
- data/test/metaschema_node_test.rb +19 -0
- data/test/schema_module_test.rb +21 -0
- data/test/schema_test.rb +40 -50
- data/test/test_helper.rb +35 -3
- data/test/util_test.rb +8 -8
- metadata +24 -16
- data/LICENSE.txt +0 -21
@@ -36,7 +36,7 @@ describe JSI::Typelike do
|
|
36
36
|
assert_equal({'type' => 'array'}, JSI::Typelike.as_json(schema))
|
37
37
|
|
38
38
|
# JSI
|
39
|
-
assert_equal(['a'], JSI::Typelike.as_json(
|
39
|
+
assert_equal(['a'], JSI::Typelike.as_json(schema.new_jsi(['a'])))
|
40
40
|
|
41
41
|
# JSON::Node
|
42
42
|
assert_equal(['a'], JSI::Typelike.as_json(JSI::JSON::Node.new_doc(['a'])))
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
|
3
|
+
describe JSI::MetaschemaNode do
|
4
|
+
let(:node_document) { {'properties' => {'properties' => {'additionalProperties' => {'$ref' => '#'}}}} }
|
5
|
+
let(:node_ptr) { JSI::JSON::Pointer[] }
|
6
|
+
let(:metaschema_root_ptr) { JSI::JSON::Pointer[] }
|
7
|
+
let(:root_schema_ptr) { JSI::JSON::Pointer[] }
|
8
|
+
let(:subject) { JSI::MetaschemaNode.new(node_document, node_ptr: node_ptr, metaschema_root_ptr: node_ptr, root_schema_ptr: node_ptr) }
|
9
|
+
describe 'initialization' do
|
10
|
+
it 'initializes' do
|
11
|
+
subject
|
12
|
+
end
|
13
|
+
end
|
14
|
+
describe 'json schema draft' do
|
15
|
+
it 'type has a schema' do
|
16
|
+
assert(JSI::JSONSchemaOrgDraft06.schema.type.schema)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
|
3
|
+
describe 'JSI::SchemaModule' do
|
4
|
+
let(:schema_content) { {'properties' => {'foo' => {'items' => {'type' => 'string'}}}} }
|
5
|
+
let(:schema) { JSI::Schema.new(schema_content) }
|
6
|
+
let(:schema_module) { schema.jsi_schema_module }
|
7
|
+
describe 'accessors and subscripts' do
|
8
|
+
it 'returns schemas using accessors and subscripts' do
|
9
|
+
assert_equal(schema.properties, schema_module.properties.possibly_schema_node)
|
10
|
+
assert_equal(schema.properties['foo'], schema_module.properties['foo'].possibly_schema_node)
|
11
|
+
assert_equal(schema.properties['foo'].jsi_schema_module, schema_module.properties['foo'])
|
12
|
+
assert_equal(schema.properties['foo'].items, schema_module.properties['foo'].items.possibly_schema_node)
|
13
|
+
assert_equal(schema.properties['foo'].items.jsi_schema_module, schema_module.properties['foo'].items)
|
14
|
+
assert_equal('string', schema_module.properties['foo'].items.type)
|
15
|
+
end
|
16
|
+
it 'accessors and subscripts with a metaschema' do
|
17
|
+
assert_equal(JSI::JSONSchemaOrgDraft06.schema.properties, JSI::JSONSchemaOrgDraft06.properties.possibly_schema_node)
|
18
|
+
assert_equal(JSI::JSONSchemaOrgDraft06.schema.properties['properties'].additionalProperties.jsi_schema_module, JSI::JSONSchemaOrgDraft06.properties['properties'].additionalProperties)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/test/schema_test.rb
CHANGED
@@ -1,53 +1,38 @@
|
|
1
1
|
require_relative 'test_helper'
|
2
2
|
|
3
|
-
SomeMetaschema = JSI.class_for_schema({id: 'https://schemas.jsi.unth.net/test/somemetaschema', type: 'object'})
|
4
|
-
|
5
3
|
describe JSI::Schema do
|
6
4
|
describe 'new' do
|
7
5
|
it 'initializes from a hash' do
|
8
6
|
schema = JSI::Schema.new({'type' => 'object'})
|
9
|
-
assert_equal(
|
7
|
+
assert_equal({'type' => 'object'}, schema.jsi_instance)
|
10
8
|
end
|
11
9
|
it 'initializes from a Node' do
|
12
10
|
schema_node = JSI::JSON::Node.new_doc({'type' => 'object'})
|
13
11
|
schema = JSI::Schema.new(schema_node)
|
14
|
-
assert_equal(schema_node, schema.
|
15
|
-
assert_equal(schema_node, schema.schema_object)
|
16
|
-
end
|
17
|
-
it 'initializes from a JSI' do
|
18
|
-
schema_jsi = SomeMetaschema.new('type' => 'object')
|
19
|
-
schema = JSI::Schema.new(schema_jsi)
|
20
|
-
assert_equal(schema_jsi, schema.schema_node)
|
21
|
-
assert_equal(schema_jsi, schema.schema_object)
|
12
|
+
assert_equal(schema_node, schema.jsi_instance)
|
22
13
|
end
|
23
14
|
it 'cannot instantiate from some unknown object' do
|
24
15
|
err = assert_raises(TypeError) { JSI::Schema.new(Object.new) }
|
25
16
|
assert_match(/\Acannot instantiate Schema from: #<Object:.*>\z/m, err.message)
|
26
17
|
end
|
27
|
-
it '
|
28
|
-
|
29
|
-
|
18
|
+
it 'instantiating a schema from schema returns that schema' do
|
19
|
+
# this is kinda dumb, but Schema.new now just aliases Schema.from_object, so this is the behavior
|
20
|
+
assert_equal(JSI::Schema.new({}), JSI::Schema.new(JSI::Schema.new({})))
|
30
21
|
end
|
31
22
|
end
|
32
23
|
describe 'as an instance of metaschema' do
|
33
|
-
let(:
|
34
|
-
validator = ::JSON::Validator.default_validator
|
35
|
-
metaschema_file = validator.metaschema
|
36
|
-
JSI::Schema.new(::JSON.parse(File.read(metaschema_file)))
|
37
|
-
end
|
38
|
-
let(:metaschema_jsi_class) { JSI.class_for_schema(default_metaschema) }
|
24
|
+
let(:metaschema_jsi_module) { JSI::JSONSchemaOrgDraft04 }
|
39
25
|
let(:schema_object) { {'type' => 'array', 'items' => {'description' => 'items!'}} }
|
40
|
-
let(:
|
41
|
-
let(:schema) { JSI::Schema.new(schema_jsi) }
|
26
|
+
let(:schema) { metaschema_jsi_module.new_jsi(schema_object) }
|
42
27
|
it '#[]' do
|
43
28
|
schema_items = schema['items']
|
44
|
-
|
29
|
+
assert_is_a(metaschema_jsi_module, schema_items)
|
45
30
|
assert_equal({'description' => 'items!'}, schema_items.as_json)
|
46
31
|
end
|
47
32
|
end
|
48
33
|
describe '#schema_id' do
|
49
|
-
it '
|
50
|
-
|
34
|
+
it "hasn't got one" do
|
35
|
+
assert_nil(JSI::Schema.new({}).schema_id)
|
51
36
|
end
|
52
37
|
it 'uses a given id with a fragment' do
|
53
38
|
schema = JSI::Schema.new({id: 'https://schemas.jsi.unth.net/test/given_id#'})
|
@@ -58,26 +43,33 @@ describe JSI::Schema do
|
|
58
43
|
assert_equal('https://schemas.jsi.unth.net/test/given_id#', schema.schema_id)
|
59
44
|
end
|
60
45
|
it 'uses a pointer in the fragment' do
|
61
|
-
|
46
|
+
schema = JSI::Schema.new({
|
62
47
|
'id' => 'https://schemas.jsi.unth.net/test/given_id#',
|
63
48
|
'properties' => {'foo' => {'type' => 'object'}},
|
64
49
|
})
|
65
|
-
|
66
|
-
assert_equal('https://schemas.jsi.unth.net/test/given_id#/properties/foo',
|
50
|
+
subschema = schema['properties']['foo']
|
51
|
+
assert_equal('https://schemas.jsi.unth.net/test/given_id#/properties/foo', subschema.schema_id)
|
67
52
|
end
|
68
53
|
it 'uses a pointer in the fragment relative to the fragment of the root' do
|
69
|
-
|
54
|
+
schema = JSI::Schema.new({
|
70
55
|
'id' => 'https://schemas.jsi.unth.net/test/given_id#/notroot',
|
71
56
|
'properties' => {'foo' => {'type' => 'object'}},
|
72
57
|
})
|
73
|
-
|
74
|
-
assert_equal('https://schemas.jsi.unth.net/test/given_id#/notroot/properties/foo',
|
58
|
+
subschema = schema['properties']['foo']
|
59
|
+
assert_equal('https://schemas.jsi.unth.net/test/given_id#/notroot/properties/foo', subschema.schema_id)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
describe '#jsi_schema_module' do
|
63
|
+
it 'returns the module for the schema' do
|
64
|
+
schema = JSI::Schema.new({'id' => 'https://schemas.jsi.unth.net/test/jsi_schema_module'})
|
65
|
+
assert_is_a(JSI::SchemaModule, schema.jsi_schema_module)
|
66
|
+
assert_equal(schema, schema.jsi_schema_module.schema)
|
75
67
|
end
|
76
68
|
end
|
77
|
-
describe '#
|
69
|
+
describe '#jsi_schema_class' do
|
78
70
|
it 'returns the class for the schema' do
|
79
|
-
|
80
|
-
assert_equal(JSI.class_for_schema(
|
71
|
+
schema = JSI::Schema.new({'id' => 'https://schemas.jsi.unth.net/test/schema_schema_class'})
|
72
|
+
assert_equal(JSI.class_for_schema(schema), schema.jsi_schema_class)
|
81
73
|
end
|
82
74
|
end
|
83
75
|
describe '#subschema_for_property' do
|
@@ -93,17 +85,17 @@ describe JSI::Schema do
|
|
93
85
|
end
|
94
86
|
it 'has a subschema by property' do
|
95
87
|
subschema = schema.subschema_for_property('foo')
|
96
|
-
|
88
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, subschema)
|
97
89
|
assert_equal('foo', subschema['description'])
|
98
90
|
end
|
99
91
|
it 'has a subschema by pattern property' do
|
100
92
|
subschema = schema.subschema_for_property('bar')
|
101
|
-
|
93
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, subschema)
|
102
94
|
assert_equal('ba*', subschema['description'])
|
103
95
|
end
|
104
96
|
it 'has a subschema by additional properties' do
|
105
97
|
subschema = schema.subschema_for_property('anything')
|
106
|
-
|
98
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, subschema)
|
107
99
|
assert_equal('whatever', subschema['description'])
|
108
100
|
end
|
109
101
|
end
|
@@ -116,10 +108,10 @@ describe JSI::Schema do
|
|
116
108
|
items: {description: 'items!'}
|
117
109
|
})
|
118
110
|
first_subschema = schema.subschema_for_index(0)
|
119
|
-
|
111
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, first_subschema)
|
120
112
|
assert_equal('items!', first_subschema['description'])
|
121
113
|
last_subschema = schema.subschema_for_index(1)
|
122
|
-
|
114
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, last_subschema)
|
123
115
|
assert_equal('items!', last_subschema['description'])
|
124
116
|
end
|
125
117
|
it 'has a subschema for each item by index' do
|
@@ -127,10 +119,10 @@ describe JSI::Schema do
|
|
127
119
|
items: [{description: 'item one'}, {description: 'item two'}]
|
128
120
|
})
|
129
121
|
first_subschema = schema.subschema_for_index(0)
|
130
|
-
|
122
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, first_subschema)
|
131
123
|
assert_equal('item one', first_subschema['description'])
|
132
124
|
last_subschema = schema.subschema_for_index(1)
|
133
|
-
|
125
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, last_subschema)
|
134
126
|
assert_equal('item two', last_subschema['description'])
|
135
127
|
end
|
136
128
|
it 'has a subschema by additional items' do
|
@@ -139,10 +131,10 @@ describe JSI::Schema do
|
|
139
131
|
additionalItems: {description: "mo' crap"},
|
140
132
|
})
|
141
133
|
first_subschema = schema.subschema_for_index(0)
|
142
|
-
|
134
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, first_subschema)
|
143
135
|
assert_equal('item one', first_subschema['description'])
|
144
136
|
last_subschema = schema.subschema_for_index(1)
|
145
|
-
|
137
|
+
assert_is_a(JSI::Schema.default_metaschema.jsi_schema_module, last_subschema)
|
146
138
|
assert_equal("mo' crap", last_subschema['description'])
|
147
139
|
end
|
148
140
|
end
|
@@ -152,15 +144,13 @@ describe JSI::Schema do
|
|
152
144
|
end
|
153
145
|
|
154
146
|
it '#inspect' do
|
155
|
-
assert_equal(
|
147
|
+
assert_equal("\#{<JSI (JSI::JSONSchemaOrgDraft06) Schema> \"id\" => \"https://schemas.jsi.unth.net/test/stringification\", \"type\" => \"object\"}", schema.inspect)
|
156
148
|
end
|
157
149
|
it '#pretty_print' do
|
158
|
-
assert_equal(
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
}
|
163
|
-
>).gsub(/^ /, ''), schema.pretty_inspect.chomp)
|
150
|
+
assert_equal("\#{<JSI (JSI::JSONSchemaOrgDraft06) Schema>
|
151
|
+
\"id\" => \"https://schemas.jsi.unth.net/test/stringification\",
|
152
|
+
\"type\" => \"object\"
|
153
|
+
}".gsub(/^ /, ''), schema.pretty_inspect.chomp)
|
164
154
|
end
|
165
155
|
end
|
166
156
|
describe 'validation' do
|
data/test/test_helper.rb
CHANGED
@@ -28,9 +28,41 @@ class JSISpec < Minitest::Spec
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def assert_equal exp, act, msg = nil
|
31
|
-
msg = message(msg, E)
|
31
|
+
msg = message(msg, E) do
|
32
|
+
[].tap do |ms|
|
33
|
+
ms << diff(exp, act)
|
34
|
+
ms << "#{ANSI.red { 'expected' }}: #{exp.inspect}"
|
35
|
+
ms << "#{ANSI.green { 'actual' }}: #{act.inspect}"
|
36
|
+
if exp.respond_to?(:to_str) && act.respond_to?(:to_str)
|
37
|
+
ms << "#{ANSI.red { 'expected (str)' }}:"
|
38
|
+
ms << exp
|
39
|
+
ms << "#{ANSI.green { 'actual (str)' }}:"
|
40
|
+
ms << act
|
41
|
+
end
|
42
|
+
end.join("\n")
|
43
|
+
end
|
32
44
|
assert exp == act, msg
|
33
45
|
end
|
46
|
+
|
47
|
+
def assert_match matcher, obj, msg = nil
|
48
|
+
msg = message(msg) do
|
49
|
+
[].tap do |ms|
|
50
|
+
ms << "Expected match."
|
51
|
+
ms << "#{ANSI.red { 'matcher' }}: #{mu_pp matcher}"
|
52
|
+
ms << "#{ANSI.green { 'object' }}: #{mu_pp obj}"
|
53
|
+
ms << "#{ANSI.yellow { 'escaped' }}: #{Regexp.new(Regexp.escape(obj)).inspect}" if obj.is_a?(String)
|
54
|
+
end.join("\n")
|
55
|
+
end
|
56
|
+
assert_respond_to matcher, :"=~"
|
57
|
+
matcher = Regexp.new Regexp.escape matcher if String === matcher
|
58
|
+
assert matcher =~ obj, msg
|
59
|
+
end
|
60
|
+
|
61
|
+
def assert_is_a mod, obj, msg = nil
|
62
|
+
msg = message(msg) { "Expected instance of #{mod}. received #{obj.class}: #{mu_pp(obj)}" }
|
63
|
+
|
64
|
+
assert obj.is_a?(mod), msg
|
65
|
+
end
|
34
66
|
end
|
35
67
|
|
36
68
|
# register this to be the base class for specs instead of Minitest::Spec
|
@@ -45,7 +77,7 @@ class SortOfHash
|
|
45
77
|
@hash
|
46
78
|
end
|
47
79
|
include JSI::FingerprintHash
|
48
|
-
def
|
80
|
+
def jsi_fingerprint
|
49
81
|
{class: self.class, hash: @hash}
|
50
82
|
end
|
51
83
|
end
|
@@ -59,7 +91,7 @@ class SortOfArray
|
|
59
91
|
@ary
|
60
92
|
end
|
61
93
|
include JSI::FingerprintHash
|
62
|
-
def
|
94
|
+
def jsi_fingerprint
|
63
95
|
{class: self.class, ary: @ary}
|
64
96
|
end
|
65
97
|
end
|
data/test/util_test.rb
CHANGED
@@ -11,9 +11,9 @@ describe JSI::Util do
|
|
11
11
|
assert_equal(expected, actual)
|
12
12
|
end
|
13
13
|
it 'stringifies JSI hash keys' do
|
14
|
-
|
15
|
-
expected = JSI.stringify_symbol_keys(
|
16
|
-
actual =
|
14
|
+
schema = JSI::Schema.new({type: 'object'})
|
15
|
+
expected = JSI.stringify_symbol_keys(schema.new_jsi({a: 'b', 'c' => 'd', nil => 3}))
|
16
|
+
actual = schema.new_jsi({'a' => 'b', 'c' => 'd', nil => 3})
|
17
17
|
assert_equal(expected, actual)
|
18
18
|
end
|
19
19
|
describe 'non-hash-like argument' do
|
@@ -22,8 +22,8 @@ describe JSI::Util do
|
|
22
22
|
assert_equal("expected argument to be a hash; got NilClass: nil", err.message)
|
23
23
|
err = assert_raises(ArgumentError) { JSI.stringify_symbol_keys(JSI::JSON::Node.new_doc(3)) }
|
24
24
|
assert_equal("expected argument to be a hash; got JSI::JSON::Node: #<JSI::JSON::Node fragment=\"#\" 3>", err.message)
|
25
|
-
err = assert_raises(ArgumentError) { JSI.stringify_symbol_keys(JSI.
|
26
|
-
|
25
|
+
err = assert_raises(ArgumentError) { JSI.stringify_symbol_keys(JSI::Schema.new({}).new_jsi(3)) }
|
26
|
+
assert_equal("expected argument to be a hash; got (JSI Schema Class: #): #<JSI 3>", err.message)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -53,9 +53,9 @@ describe JSI::Util do
|
|
53
53
|
assert_equal(expected, actual)
|
54
54
|
end
|
55
55
|
it 'deep stringifies JSI instance' do
|
56
|
-
|
57
|
-
actual = JSI.deep_stringify_symbol_keys(
|
58
|
-
expected =
|
56
|
+
schema = JSI::Schema.new(type: 'object')
|
57
|
+
actual = JSI.deep_stringify_symbol_keys(schema.new_jsi(JSI::JSON::Node.new_doc({a: 'b', 'c' => {d: 0}, nil => 3})))
|
58
|
+
expected = schema.new_jsi(JSI::JSON::Node.new_doc({'a' => 'b', 'c' => {'d' => 0}, nil => 3}))
|
59
59
|
assert_equal(expected, actual)
|
60
60
|
end
|
61
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest-around
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -97,7 +97,7 @@ dependencies:
|
|
97
97
|
description: JSI offers an Object-Oriented representation for JSON data using JSON
|
98
98
|
Schemas
|
99
99
|
email:
|
100
|
-
- ethan@unth.net
|
100
|
+
- ethan.jsi@unth.net
|
101
101
|
executables: []
|
102
102
|
extensions: []
|
103
103
|
extra_rdoc_files: []
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- ".simplecov"
|
106
106
|
- ".yardopts"
|
107
107
|
- CHANGELOG.md
|
108
|
-
- LICENSE.
|
108
|
+
- LICENSE.md
|
109
109
|
- README.md
|
110
110
|
- Rakefile.rb
|
111
111
|
- jsi.gemspec
|
@@ -117,6 +117,8 @@ files:
|
|
117
117
|
- lib/jsi/json.rb
|
118
118
|
- lib/jsi/json/node.rb
|
119
119
|
- lib/jsi/json/pointer.rb
|
120
|
+
- lib/jsi/metaschema.rb
|
121
|
+
- lib/jsi/metaschema_node.rb
|
120
122
|
- lib/jsi/pathed_node.rb
|
121
123
|
- lib/jsi/schema.rb
|
122
124
|
- lib/jsi/schema_classes.rb
|
@@ -124,6 +126,9 @@ files:
|
|
124
126
|
- lib/jsi/typelike_modules.rb
|
125
127
|
- lib/jsi/util.rb
|
126
128
|
- lib/jsi/version.rb
|
129
|
+
- lib/schemas/json-schema.org/draft-04/schema.rb
|
130
|
+
- lib/schemas/json-schema.org/draft-06/schema.rb
|
131
|
+
- resources/icons/AGPL-3.0.png
|
127
132
|
- test/base_array_test.rb
|
128
133
|
- test/base_hash_test.rb
|
129
134
|
- test/base_test.rb
|
@@ -134,13 +139,15 @@ files:
|
|
134
139
|
- test/jsi_json_pointer_test.rb
|
135
140
|
- test/jsi_test.rb
|
136
141
|
- test/jsi_typelike_as_json_test.rb
|
142
|
+
- test/metaschema_node_test.rb
|
143
|
+
- test/schema_module_test.rb
|
137
144
|
- test/schema_test.rb
|
138
145
|
- test/spreedly_openapi_test.rb
|
139
146
|
- test/test_helper.rb
|
140
147
|
- test/util_test.rb
|
141
148
|
homepage: https://github.com/notEthan/jsi
|
142
149
|
licenses:
|
143
|
-
-
|
150
|
+
- AGPL-3.0
|
144
151
|
metadata: {}
|
145
152
|
post_install_message:
|
146
153
|
rdoc_options: []
|
@@ -157,8 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
164
|
- !ruby/object:Gem::Version
|
158
165
|
version: '0'
|
159
166
|
requirements: []
|
160
|
-
|
161
|
-
rubygems_version: 2.7.8
|
167
|
+
rubygems_version: 3.0.6
|
162
168
|
signing_key:
|
163
169
|
specification_version: 4
|
164
170
|
summary: 'JSI: JSON Schema Instantiation'
|
@@ -173,6 +179,8 @@ test_files:
|
|
173
179
|
- test/jsi_json_pointer_test.rb
|
174
180
|
- test/jsi_test.rb
|
175
181
|
- test/jsi_typelike_as_json_test.rb
|
182
|
+
- test/metaschema_node_test.rb
|
183
|
+
- test/schema_module_test.rb
|
176
184
|
- test/schema_test.rb
|
177
185
|
- test/spreedly_openapi_test.rb
|
178
186
|
- test/test_helper.rb
|