jsi 0.2.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/CHANGELOG.md +36 -0
- data/LICENSE.md +613 -0
- data/README.md +153 -52
- data/lib/jsi/base.rb +485 -338
- data/lib/jsi/jsi_coder.rb +24 -18
- data/lib/jsi/metaschema.rb +7 -0
- data/lib/jsi/metaschema_node/bootstrap_schema.rb +100 -0
- data/lib/jsi/metaschema_node.rb +245 -0
- data/lib/jsi/pathed_node.rb +49 -46
- data/lib/jsi/ptr.rb +292 -0
- data/lib/jsi/schema/application/child_application/contains.rb +16 -0
- data/lib/jsi/schema/application/child_application/draft04.rb +22 -0
- data/lib/jsi/schema/application/child_application/draft06.rb +29 -0
- data/lib/jsi/schema/application/child_application/draft07.rb +29 -0
- data/lib/jsi/schema/application/child_application/items.rb +18 -0
- data/lib/jsi/schema/application/child_application/properties.rb +25 -0
- data/lib/jsi/schema/application/child_application.rb +40 -0
- data/lib/jsi/schema/application/draft04.rb +8 -0
- data/lib/jsi/schema/application/draft06.rb +8 -0
- data/lib/jsi/schema/application/draft07.rb +8 -0
- data/lib/jsi/schema/application/inplace_application/dependencies.rb +28 -0
- data/lib/jsi/schema/application/inplace_application/draft04.rb +26 -0
- data/lib/jsi/schema/application/inplace_application/draft06.rb +27 -0
- data/lib/jsi/schema/application/inplace_application/draft07.rb +33 -0
- data/lib/jsi/schema/application/inplace_application/ifthenelse.rb +20 -0
- data/lib/jsi/schema/application/inplace_application/ref.rb +18 -0
- data/lib/jsi/schema/application/inplace_application/someof.rb +29 -0
- data/lib/jsi/schema/application/inplace_application.rb +46 -0
- data/lib/jsi/schema/application.rb +12 -0
- data/lib/jsi/schema/draft04.rb +14 -0
- data/lib/jsi/schema/draft06.rb +14 -0
- data/lib/jsi/schema/draft07.rb +14 -0
- data/lib/jsi/schema/issue.rb +36 -0
- data/lib/jsi/schema/ref.rb +159 -0
- data/lib/jsi/schema/schema_ancestor_node.rb +119 -0
- data/lib/jsi/schema/validation/array.rb +69 -0
- data/lib/jsi/schema/validation/const.rb +20 -0
- data/lib/jsi/schema/validation/contains.rb +25 -0
- data/lib/jsi/schema/validation/core.rb +39 -0
- data/lib/jsi/schema/validation/dependencies.rb +49 -0
- data/lib/jsi/schema/validation/draft04/minmax.rb +91 -0
- data/lib/jsi/schema/validation/draft04.rb +112 -0
- data/lib/jsi/schema/validation/draft06.rb +122 -0
- data/lib/jsi/schema/validation/draft07.rb +159 -0
- data/lib/jsi/schema/validation/enum.rb +25 -0
- data/lib/jsi/schema/validation/ifthenelse.rb +46 -0
- data/lib/jsi/schema/validation/items.rb +54 -0
- data/lib/jsi/schema/validation/not.rb +20 -0
- data/lib/jsi/schema/validation/numeric.rb +121 -0
- data/lib/jsi/schema/validation/object.rb +45 -0
- data/lib/jsi/schema/validation/pattern.rb +34 -0
- data/lib/jsi/schema/validation/properties.rb +101 -0
- data/lib/jsi/schema/validation/property_names.rb +32 -0
- data/lib/jsi/schema/validation/ref.rb +40 -0
- data/lib/jsi/schema/validation/required.rb +27 -0
- data/lib/jsi/schema/validation/someof.rb +90 -0
- data/lib/jsi/schema/validation/string.rb +47 -0
- data/lib/jsi/schema/validation/type.rb +49 -0
- data/lib/jsi/schema/validation.rb +51 -0
- data/lib/jsi/schema.rb +528 -233
- data/lib/jsi/schema_classes.rb +238 -51
- data/lib/jsi/schema_registry.rb +141 -0
- data/lib/jsi/schema_set.rb +141 -0
- data/lib/jsi/simple_wrap.rb +8 -3
- data/lib/jsi/typelike_modules.rb +75 -68
- data/lib/jsi/util/attr_struct.rb +106 -0
- data/lib/jsi/util.rb +167 -64
- data/lib/jsi/validation/error.rb +34 -0
- data/lib/jsi/validation/result.rb +210 -0
- data/lib/jsi/validation.rb +15 -0
- data/lib/jsi/version.rb +3 -1
- data/lib/jsi.rb +72 -9
- data/lib/schemas/json-schema.org/draft-04/schema.rb +12 -0
- data/lib/schemas/json-schema.org/draft-06/schema.rb +12 -0
- data/lib/schemas/json-schema.org/draft-07/schema.rb +12 -0
- data/readme.rb +138 -0
- data/{resources}/schemas/json-schema.org/draft-04/schema.json +149 -0
- data/{resources}/schemas/json-schema.org/draft-06/schema.json +154 -0
- data/{resources}/schemas/json-schema.org/draft-07/schema.json +168 -0
- metadata +80 -107
- data/.simplecov +0 -1
- data/LICENSE.txt +0 -21
- data/Rakefile.rb +0 -9
- data/jsi.gemspec +0 -31
- data/lib/jsi/base/to_rb.rb +0 -126
- data/lib/jsi/json/node.rb +0 -243
- data/lib/jsi/json/pointer.rb +0 -330
- data/lib/jsi/json-schema-fragments.rb +0 -59
- data/lib/jsi/json.rb +0 -8
- data/test/base_array_test.rb +0 -209
- data/test/base_hash_test.rb +0 -204
- data/test/base_test.rb +0 -422
- data/test/jsi_coder_test.rb +0 -85
- data/test/jsi_json_arraynode_test.rb +0 -150
- data/test/jsi_json_hashnode_test.rb +0 -132
- data/test/jsi_json_node_test.rb +0 -310
- data/test/jsi_json_pointer_test.rb +0 -106
- data/test/jsi_test.rb +0 -11
- data/test/jsi_typelike_as_json_test.rb +0 -53
- data/test/schema_test.rb +0 -196
- data/test/spreedly_openapi_test.rb +0 -8
- data/test/test_helper.rb +0 -63
- 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,132 +1,120 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.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: 2022-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: addressable
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
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.
|
27
|
-
-
|
28
|
-
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.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: '5.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '5.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
|
-
description: JSI represents json-schemas as ruby classes and json-schema instances
|
84
|
-
as instances of those classes
|
26
|
+
version: '2.3'
|
27
|
+
description: JSI offers an Object-Oriented representation for JSON data using JSON
|
28
|
+
Schemas
|
85
29
|
email:
|
86
|
-
- ethan@unth.net
|
30
|
+
- ethan.jsi@unth.net
|
87
31
|
executables: []
|
88
32
|
extensions: []
|
89
33
|
extra_rdoc_files: []
|
90
34
|
files:
|
91
|
-
- ".simplecov"
|
92
35
|
- ".yardopts"
|
93
36
|
- CHANGELOG.md
|
94
|
-
- LICENSE.
|
37
|
+
- LICENSE.md
|
95
38
|
- README.md
|
96
|
-
- Rakefile.rb
|
97
|
-
- jsi.gemspec
|
98
39
|
- lib/jsi.rb
|
99
40
|
- lib/jsi/base.rb
|
100
|
-
- lib/jsi/base/to_rb.rb
|
101
41
|
- lib/jsi/jsi_coder.rb
|
102
|
-
- lib/jsi/
|
103
|
-
- lib/jsi/
|
104
|
-
- lib/jsi/
|
105
|
-
- lib/jsi/json/pointer.rb
|
42
|
+
- lib/jsi/metaschema.rb
|
43
|
+
- lib/jsi/metaschema_node.rb
|
44
|
+
- lib/jsi/metaschema_node/bootstrap_schema.rb
|
106
45
|
- lib/jsi/pathed_node.rb
|
46
|
+
- lib/jsi/ptr.rb
|
107
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
|
108
97
|
- lib/jsi/schema_classes.rb
|
98
|
+
- lib/jsi/schema_registry.rb
|
99
|
+
- lib/jsi/schema_set.rb
|
109
100
|
- lib/jsi/simple_wrap.rb
|
110
101
|
- lib/jsi/typelike_modules.rb
|
111
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
|
112
107
|
- lib/jsi/version.rb
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
- test/jsi_json_pointer_test.rb
|
121
|
-
- test/jsi_test.rb
|
122
|
-
- test/jsi_typelike_as_json_test.rb
|
123
|
-
- test/schema_test.rb
|
124
|
-
- test/spreedly_openapi_test.rb
|
125
|
-
- test/test_helper.rb
|
126
|
-
- test/util_test.rb
|
108
|
+
- lib/schemas/json-schema.org/draft-04/schema.rb
|
109
|
+
- lib/schemas/json-schema.org/draft-06/schema.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"
|
127
115
|
homepage: https://github.com/notEthan/jsi
|
128
116
|
licenses:
|
129
|
-
-
|
117
|
+
- AGPL-3.0
|
130
118
|
metadata: {}
|
131
119
|
post_install_message:
|
132
120
|
rdoc_options: []
|
@@ -143,23 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
131
|
- !ruby/object:Gem::Version
|
144
132
|
version: '0'
|
145
133
|
requirements: []
|
146
|
-
|
147
|
-
rubygems_version: 2.7.8
|
134
|
+
rubygems_version: 3.1.2
|
148
135
|
signing_key:
|
149
136
|
specification_version: 4
|
150
|
-
summary: 'JSI: JSON
|
151
|
-
test_files:
|
152
|
-
- test/base_array_test.rb
|
153
|
-
- test/base_hash_test.rb
|
154
|
-
- test/base_test.rb
|
155
|
-
- test/jsi_coder_test.rb
|
156
|
-
- test/jsi_json_arraynode_test.rb
|
157
|
-
- test/jsi_json_hashnode_test.rb
|
158
|
-
- test/jsi_json_node_test.rb
|
159
|
-
- test/jsi_json_pointer_test.rb
|
160
|
-
- test/jsi_test.rb
|
161
|
-
- test/jsi_typelike_as_json_test.rb
|
162
|
-
- test/schema_test.rb
|
163
|
-
- test/spreedly_openapi_test.rb
|
164
|
-
- test/test_helper.rb
|
165
|
-
- test/util_test.rb
|
137
|
+
summary: 'JSI: JSON Schema Instantiation'
|
138
|
+
test_files: []
|
data/.simplecov
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
SimpleCov.start
|
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2016 Ethan
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/Rakefile.rb
DELETED
data/jsi.gemspec
DELETED
@@ -1,31 +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@unth.net"]
|
10
|
-
|
11
|
-
spec.summary = "JSI: JSON-Schema instantiation"
|
12
|
-
spec.description = "JSI represents json-schemas as ruby classes and json-schema instances as instances of those classes"
|
13
|
-
spec.homepage = "https://github.com/notEthan/jsi"
|
14
|
-
spec.license = "MIT"
|
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
|
-
Dir.chdir(File.expand_path('..', __FILE__)) do
|
18
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(ignore_files_re) }
|
19
|
-
spec.test_files = `git ls-files -z test`.split("\x0")
|
20
|
-
end
|
21
|
-
spec.bindir = "exe"
|
22
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
-
spec.require_paths = ["lib"]
|
24
|
-
|
25
|
-
# we are monkey patching json-schema with a fix that has not been merged in a timely fashion.
|
26
|
-
spec.add_dependency "json-schema", "~> 2.8"
|
27
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
-
spec.add_development_dependency "minitest", "~> 5.0"
|
29
|
-
spec.add_development_dependency "minitest-around"
|
30
|
-
spec.add_development_dependency "minitest-reporters"
|
31
|
-
end
|