jsi-dev 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 599d7abb635e1cf9cc2ac8918047bf811d17d18833205fa6f07689ba4e065faa
4
- data.tar.gz: ae0ce6b1348f5278d9df66bd799513673d7f68a2e363d4955bf0097d255419fe
3
+ metadata.gz: 6d6f0d6e7ed165077aefd9716cbdf9dbc1e6fa9c62eaa809a9ce796d15ec367b
4
+ data.tar.gz: f463c64945fc7f666b39320717642188d7375650bb0ad681d0e6f6cadabc279a
5
5
  SHA512:
6
- metadata.gz: 2aae63956bb9561a5aac559ba3ab1ca91a2722adf10a7b639c103abe2c2cdd1361fb6917b80d05b4c6b25bb41e97e9d79e11cb6505187d050523b6cee91ec2b6
7
- data.tar.gz: afc015ad1476ddbdb031ac4f5c154d453787a9a643db362b60f1a712dd64eeddfa8dee08e3b4ad0ee98719f056b6cb0e62b51be38de83474fbc4256fda8ba1c5
6
+ metadata.gz: 335a86b944ca363b7f1da2d91df7f84a3ad31029bfbb70be082ac4c7865bdbab72c4cf283fd00da7bb09778d438793665b47b85bb9fb4c07a43ff719213503a6
7
+ data.tar.gz: 4c1c492253e10b2513a10781ea2617863d50591dcc4effa037d21bf15110c5167b533b24ecc3754c5a000c1a0ad46f56cf48dcdcf04f25dee143af36b57cc77c
data/.yardopts CHANGED
@@ -1,6 +1,6 @@
1
1
  --main README.md
2
2
  --markup=markdown
3
- --markup-provider=commonmarker
3
+ --markup-provider=redcarpet
4
4
  --no-private
5
5
  --hide-void-return
6
6
  --files docs/**/*.md
data/docs/Glossary.md CHANGED
@@ -19,295 +19,295 @@ The terminology from these can be contradictory, e.g. 'object' in JSON meaning w
19
19
  ## Terms
20
20
 
21
21
 
22
- - ### JSI
22
+ ### JSI
23
23
 
24
- [JSI]: #JSI
25
- [a JSI]: #JSI
24
+ [JSI]: #jsi
25
+ [a JSI]: #jsi
26
26
 
27
- JSI is the name of this library. As a [countable](https://en.wikipedia.org/wiki/Count_noun), "a JSI" refers to the library's instantiation of an instance described by a set of [schema]s. This is a Ruby instance of {JSI::Base}, and also an instance of the [schema module] belonging to each schema that describes it (its {JSI::Base#jsi_schemas}).
27
+ JSI is the name of this library. As a [countable](https://en.wikipedia.org/wiki/Count_noun), "a JSI" refers to the library's instantiation of an instance described by a set of [schema]s. This is a Ruby instance of {JSI::Base}, and also an instance of the [schema module] belonging to each schema that describes it (its {JSI::Base#jsi_schemas}).
28
28
 
29
29
 
30
- - ### node
30
+ ### node
31
31
 
32
- [node]: #node
32
+ [node]: #node
33
33
 
34
- A node is part of a [document] at a location identified by a [pointer].
34
+ A node is part of a [document] at a location identified by a [pointer].
35
35
 
36
- In JSI a node generally means [a JSI] - a {JSI::Base} instance is often referred to just as "a JSI", but is referred to as a node in the context of its relationship to other nodes in its document.
36
+ In JSI a node generally means [a JSI] - a {JSI::Base} instance is often referred to just as "a JSI", but is referred to as a node in the context of its relationship to other nodes in its document.
37
37
 
38
38
 
39
- - ### node content
39
+ ### node content
40
40
 
41
- [content]: #node_content
41
+ [content]: #node_content
42
42
 
43
- The content of a [node] is the parsed JSON instance.
44
- It is generally a Ruby Hash, Array, String, Integer, Float or BigDecimal, true, false, or nil.
43
+ The content of a [node] is the parsed JSON instance.
44
+ It is generally a Ruby Hash, Array, String, Integer, Float or BigDecimal, true, false, or nil.
45
45
 
46
- This content is referred to as the 'instance' in relation to [schema]s that describe it.
46
+ This content is referred to as the 'instance' in relation to [schema]s that describe it.
47
47
 
48
- See {JSI::Base#jsi_node_content} (also aliased as {JSI::Base#jsi_instance}.
48
+ See {JSI::Base#jsi_node_content} (also aliased as {JSI::Base#jsi_instance}.
49
49
 
50
50
 
51
- - ### document
51
+ ### document
52
52
 
53
- [document]: #document
53
+ [document]: #document
54
54
 
55
- The document is the [content] of the [root] [node].
55
+ The document is the [content] of the [root] [node].
56
56
 
57
- See {JSI::Base#jsi_document}.
57
+ See {JSI::Base#jsi_document}.
58
58
 
59
59
 
60
- - ### root
60
+ ### root
61
61
 
62
- [root]: #root
62
+ [root]: #root
63
63
 
64
- A [node] representing the whole of a [document].
64
+ A [node] representing the whole of a [document].
65
65
 
66
- Its [pointer] is empty (has zero [token]s).
66
+ Its [pointer] is empty (has zero [token]s).
67
67
 
68
- See {JSI::Base#jsi_root_node}.
68
+ See {JSI::Base#jsi_root_node}.
69
69
 
70
70
 
71
- - ### child
71
+ ### child
72
72
 
73
- [child]: #child
73
+ [child]: #child
74
74
 
75
- A [node] immediately below another node, its [parent]. Identified by one [token] relative to the parent.
75
+ A [node] immediately below another node, its [parent]. Identified by one [token] relative to the parent.
76
76
 
77
- See {JSI::Base#[]} and {JSI::Base#jsi_child_node}.
77
+ See {JSI::Base#[]} and {JSI::Base#jsi_child_node}.
78
78
 
79
79
 
80
- - ### parent
80
+ ### parent
81
81
 
82
- [parent]: #parent
82
+ [parent]: #parent
83
83
 
84
- A [node] immediately above some number of other nodes, its [child]ren. Only a [hash/object] or [array] can be a parent.
84
+ A [node] immediately above some number of other nodes, its [child]ren. Only a [hash/object] or [array] can be a parent.
85
85
 
86
- See {JSI::Base#jsi_parent_node}.
86
+ See {JSI::Base#jsi_parent_node}.
87
87
 
88
88
 
89
- - ### descendent
89
+ ### descendent
90
90
 
91
- [descendent]: #descendent
91
+ [descendent]: #descendent
92
92
 
93
- A [node] anywhere below another node, its [ancestor]. Identified by a relative [pointer]. A node is considered to be a descendent of itself (at an empty relative pointer).
93
+ A [node] anywhere below another node, its [ancestor]. Identified by a relative [pointer]. A node is considered to be a descendent of itself (at an empty relative pointer).
94
94
 
95
- See {JSI::Base#jsi_descendent_node}, {JSI::Base#jsi_each_descendent_node}.
95
+ See {JSI::Base#jsi_descendent_node}, {JSI::Base#jsi_each_descendent_node}.
96
96
 
97
97
 
98
- - ### ancestor
98
+ ### ancestor
99
99
 
100
- [ancestor]: #ancestor
100
+ [ancestor]: #ancestor
101
101
 
102
- A [node] above any number of other nodes, its [descendent]s. A node is considered to be an ancestor of itself, and the [root] node is an ancestor of every node in the [document].
102
+ A [node] above any number of other nodes, its [descendent]s. A node is considered to be an ancestor of itself, and the [root] node is an ancestor of every node in the [document].
103
103
 
104
- See {JSI::Base#jsi_ancestor_nodes}.
104
+ See {JSI::Base#jsi_ancestor_nodes}.
105
105
 
106
106
 
107
- - ### token
107
+ ### token
108
108
 
109
- [token]: #token
109
+ [token]: #token
110
110
 
111
- An [array] [index] or [hash/object] [key/property name] that identifies a child node of its parent. Generally a String or non-negative Integer. [JSON Pointer](https://www.rfc-editor.org/rfc/rfc6901) calls this a "reference token".
111
+ An [array] [index] or [hash/object] [key/property name] that identifies a child node of its parent. Generally a String or non-negative Integer. [JSON Pointer](https://www.rfc-editor.org/rfc/rfc6901) calls this a "reference token".
112
112
 
113
- A sequence of tokens comprises a [pointer].
113
+ A sequence of tokens comprises a [pointer].
114
114
 
115
115
 
116
- - ### pointer
116
+ ### pointer
117
117
 
118
- [pointer]: #pointer
118
+ [pointer]: #pointer
119
119
 
120
- A sequence of [token]s which identifies a [descendent] of a [node], instantiated as a {JSI::Ptr}.
120
+ A sequence of [token]s which identifies a [descendent] of a [node], instantiated as a {JSI::Ptr}.
121
121
 
122
- [JSON Pointers](https://www.rfc-editor.org/rfc/rfc6901) are parsed to JSI pointers.
122
+ [JSON Pointers](https://www.rfc-editor.org/rfc/rfc6901) are parsed to JSI pointers.
123
123
 
124
- A pointer may be referred to as 'absolute' when identifying a descendent of the root node (see {JSI::Base#jsi_ptr}), or 'relative' identifying a descendent of any ancestor node (such as the pointer passed to {JSI::Base#jsi_descendent_node}).
124
+ A pointer may be referred to as 'absolute' when identifying a descendent of the root node (see {JSI::Base#jsi_ptr}), or 'relative' identifying a descendent of any ancestor node (such as the pointer passed to {JSI::Base#jsi_descendent_node}).
125
125
 
126
126
 
127
- - ### hash/object
127
+ ### hash/object
128
128
 
129
- [hash/object]: #hash_object
129
+ [hash/object]: #hash_object
130
130
 
131
- In JSON, an object; in Ruby, a Hash, or something [implicitly convertible](https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html) with `#to_hash`.
131
+ In JSON, an object; in Ruby, a Hash, or something [implicitly convertible](https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html) with `#to_hash`.
132
132
 
133
- In JSI, a [node] whose content is a Hash/`#to_hash`, and which is a {JSI::Base::HashNode}). These nodes are largely used as one would use a Hash, aiming to replicate Hash's API, as well being implicitly convertible with `#to_hash`.
133
+ In JSI, a [node] whose content is a Hash/`#to_hash`, and which is a {JSI::Base::HashNode}). These nodes are largely used as one would use a Hash, aiming to replicate Hash's API, as well being implicitly convertible with `#to_hash`.
134
134
 
135
- A hash/object has [child] nodes on each [key/property name].
135
+ A hash/object has [child] nodes on each [key/property name].
136
136
 
137
137
 
138
- - ### array
138
+ ### array
139
139
 
140
- [array]: #array
140
+ [array]: #array
141
141
 
142
- In JSON, an array; in Ruby, an Array, or something [implicitly convertible](https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html) with `#to_ary`.
142
+ In JSON, an array; in Ruby, an Array, or something [implicitly convertible](https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html) with `#to_ary`.
143
143
 
144
- In JSI, a [node] whose content is an Array/`#to_ary`, and which is a {JSI::Base::ArrayNode}). These nodes are largely used as one would use an Array, aiming to replicate Array's API, as well being implicitly convertible with `#to_ary`.
144
+ In JSI, a [node] whose content is an Array/`#to_ary`, and which is a {JSI::Base::ArrayNode}). These nodes are largely used as one would use an Array, aiming to replicate Array's API, as well being implicitly convertible with `#to_ary`.
145
145
 
146
- An array has [child] nodes on each [index].
146
+ An array has [child] nodes on each [index].
147
147
 
148
148
 
149
- - ### key/property name
149
+ ### key/property name
150
150
 
151
- [key/property name]: #key_property_name
151
+ [key/property name]: #key_property_name
152
152
 
153
- A [token] identifying a [child] of a [hash/object] [node]. In Ruby, a Hash key; in JSON Schema, an object property name. Property names are always strings in JSON. Note that symbols are not compatible and generally should not be used.
153
+ A [token] identifying a [child] of a [hash/object] [node]. In Ruby, a Hash key; in JSON Schema, an object property name. Property names are always strings in JSON. Note that symbols are not compatible and generally should not be used.
154
154
 
155
- Property names can be described by schemas (using the `propertyNames` keyword), and can be JSI instances of those schemas. See {JSI::Base::HashNode#jsi_each_propertyName}.
155
+ Property names can be described by schemas (using the `propertyNames` keyword), and can be JSI instances of those schemas. See {JSI::Base::HashNode#jsi_each_propertyName}.
156
156
 
157
157
 
158
- - ### index
158
+ ### index
159
159
 
160
- [index]: #index
160
+ [index]: #index
161
161
 
162
- A [token] identifying a [child] of an [array] [node]. A non-negative integer. This may be represented in string form in a [pointer].
162
+ A [token] identifying a [child] of an [array] [node]. A non-negative integer. This may be represented in string form in a [pointer].
163
163
 
164
164
 
165
- - ### instance
165
+ ### instance
166
166
 
167
- [instance]: #instance
167
+ [instance]: #instance
168
168
 
169
- A heavily-overloaded term. Context should make it clear in what sense it is being used. 'Instance' can refer to an *object* or a *relationship*, in Ruby or JSON Schema or JSI instantiation:
169
+ A heavily-overloaded term. Context should make it clear in what sense it is being used. 'Instance' can refer to an *object* or a *relationship*, in Ruby or JSON Schema or JSI instantiation:
170
170
 
171
- - JSON Schema: the *instance* (JSON data) is an *instance* (relationship) of JSON Schemas that describe it
172
- - Ruby: the *instance* (an Object) is an *instance* (relationship) of a Class and included Modules
173
- - JSI: the *instance* ([a JSI]) is an *instance* (relationship) of [JSI Schemas][schema]
171
+ - JSON Schema: the *instance* (JSON data) is an *instance* (relationship) of JSON Schemas that describe it
172
+ - Ruby: the *instance* (an Object) is an *instance* (relationship) of a Class and included Modules
173
+ - JSI: the *instance* ([a JSI]) is an *instance* (relationship) of [JSI Schemas][schema]
174
174
 
175
- These all operate in parallel in JSI: a JSI instance represents a JSON instance, it is described by JSI Schemas which represent JSON Schemas, and it is a Ruby instance of the [JSI Schema Modules][schema module] of the schemas that describe it.
175
+ These all operate in parallel in JSI: a JSI instance represents a JSON instance, it is described by JSI Schemas which represent JSON Schemas, and it is a Ruby instance of the [JSI Schema Modules][schema module] of the schemas that describe it.
176
176
 
177
177
 
178
- - ### schema
178
+ ### schema
179
179
 
180
- [schema]: #schema
180
+ [schema]: #schema
181
181
 
182
- A JSI Schema is [a JSI] that represents a JSON Schema. It is a Ruby instance of {JSI::Base} and the module {JSI::Schema}.
182
+ A JSI Schema is [a JSI] that represents a JSON Schema. It is a Ruby instance of {JSI::Base} and the module {JSI::Schema}.
183
183
 
184
- A schema describes a set of [instance]s. Any JSI instance that is described by a given schema is a Ruby instance of that schema's [schema module].
184
+ A schema describes a set of [instance]s. Any JSI instance that is described by a given schema is a Ruby instance of that schema's [schema module].
185
185
 
186
- A schema is described by a [meta-schema] and is a Ruby instance of that meta-schema's [schema module].
186
+ A schema is described by a [meta-schema] and is a Ruby instance of that meta-schema's [schema module].
187
187
 
188
188
 
189
- - ### schema module
189
+ ### schema module
190
190
 
191
- [schema module]: #schema_module
191
+ [schema module]: #schema_module
192
192
 
193
- A JSI Schema Module is a Ruby module associated with a particular [schema]. Any JSI instance that is described by that schema is a Ruby instance of the schema's schema module. This is a {JSI::SchemaModule}.
193
+ A JSI Schema Module is a Ruby module associated with a particular [schema]. Any JSI instance that is described by that schema is a Ruby instance of the schema's schema module. This is a {JSI::SchemaModule}.
194
194
 
195
- See {JSI::Schema#jsi_schema_module}.
195
+ See {JSI::Schema#jsi_schema_module}.
196
196
 
197
- A JSI Schema Module is not to be confused with the module {JSI::Schema} - a schema *is* a Ruby instance of the module JSI::Schema, and it *has* a JSI Schema Module. The module JSI::Schema is included on the JSI Schema module of a [meta-schema].
197
+ A JSI Schema Module is not to be confused with the module {JSI::Schema} - a schema *is* a Ruby instance of the module JSI::Schema, and it *has* a JSI Schema Module. The module JSI::Schema is included on the JSI Schema module of a [meta-schema].
198
198
 
199
199
 
200
- - ### meta-schema
200
+ ### meta-schema
201
201
 
202
- [meta-schema]: #meta-schema
202
+ [meta-schema]: #meta-schema
203
203
 
204
- A meta-schema is a [schema] that describes schemas, i.e. [instance]s of the meta-schema are schemas.
204
+ A meta-schema is a [schema] that describes schemas, i.e. [instance]s of the meta-schema are schemas.
205
205
 
206
- As with any other JSI instance, a JSI schema is an instance of the [schema module] of the meta-schema that describes it. The meta-schema's schema module defines the functionality for its instances to behave as schemas. It includes the module {JSI::Schema}.
206
+ As with any other JSI instance, a JSI schema is an instance of the [schema module] of the meta-schema that describes it. The meta-schema's schema module defines the functionality for its instances to behave as schemas. It includes the module {JSI::Schema}.
207
207
 
208
- A meta-schema is described by a meta-schema, which may be itself or another meta-schema. Examples of self-describing meta-schemas are the JSON Schema meta-schemas. An example of the latter is the [schema describing the OpenAPI v3.0 Schema object](https://github.com/OAI/OpenAPI-Specification/blob/3.0.3/schemas/v3.0/schema.yaml#L203), which describes schemas in OpenAPI documents, but is itself described by the JSON Schema draft-04 meta-schema.
208
+ A meta-schema is described by a meta-schema, which may be itself or another meta-schema. Examples of self-describing meta-schemas are the JSON Schema meta-schemas. An example of the latter is the [schema describing the OpenAPI v3.0 Schema object](https://github.com/OAI/OpenAPI-Specification/blob/3.0.3/schemas/v3.0/schema.yaml#L203), which describes schemas in OpenAPI documents, but is itself described by the JSON Schema draft-04 meta-schema.
209
209
 
210
- A self-describing meta-schema is a Ruby instance of its own schema module.
210
+ A self-describing meta-schema is a Ruby instance of its own schema module.
211
211
 
212
- A meta-schema has a [dialect] that defines the functionality of the schemas it describes.
212
+ A meta-schema has a [dialect] that defines the functionality of the schemas it describes.
213
213
 
214
- In JSI, a meta-schema is a {JSI::Base} that is a {JSI::Schema::MetaSchema}. Its schema module is a {JSI::SchemaModule::MetaSchemaModule}, and includes {JSI::Schema}. See also {JSI::Schema#describes_schema?} and {JSI::Schema#describes_schema!}.
214
+ In JSI, a meta-schema is a {JSI::Base} that is a {JSI::Schema::MetaSchema}. Its schema module is a {JSI::SchemaModule::MetaSchemaModule}, and includes {JSI::Schema}. See also {JSI::Schema#describes_schema?} and {JSI::Schema#describes_schema!}.
215
215
 
216
216
 
217
- - ### dialect
217
+ ### dialect
218
218
 
219
- [dialect]: #dialect
219
+ [dialect]: #dialect
220
220
 
221
- A dialect defines all the keywords of a JSON Schema, how they operate, and any other aspects of schema behavior. It consists of a set of one or more [vocabularies][vocabulary]. Note that while not all specifications of dialects use the terms 'dialect' or 'vocabulary', JSI uses these abstractions for all supported specifications.
221
+ A dialect defines all the keywords of a JSON Schema, how they operate, and any other aspects of schema behavior. It consists of a set of one or more [vocabularies][vocabulary]. Note that while not all specifications of dialects use the terms 'dialect' or 'vocabulary', JSI uses these abstractions for all supported specifications.
222
222
 
223
- Examples of dialects include:
224
- - Each published JSON Schema specification
225
- - variants of JSON Schema defined by OpenAPI 2.x and 3.x
226
- - custom dialects composed of vocabularies specified using the `$vocabulary` keyword
223
+ Examples of dialects include:
224
+ - Each published JSON Schema specification
225
+ - variants of JSON Schema defined by OpenAPI 2.x and 3.x
226
+ - custom dialects composed of vocabularies specified using the `$vocabulary` keyword
227
227
 
228
- A dialect defines some or all of:
228
+ A dialect defines some or all of:
229
229
 
230
- - a set of keywords
231
- - those keywords' behavior and interactions with other keywords
232
- - non-keyword behaviors of a schema (e.g. boolean schemas)
233
- - division of keywords into vocabularies
234
- - how vocabularies operate
235
- - a meta-schema that describes/validates instances of the schema the dialect defines
230
+ - a set of keywords
231
+ - those keywords' behavior and interactions with other keywords
232
+ - non-keyword behaviors of a schema (e.g. boolean schemas)
233
+ - division of keywords into vocabularies
234
+ - how vocabularies operate
235
+ - a meta-schema that describes/validates instances of the schema the dialect defines
236
236
 
237
- Represented as a {JSI::Schema::Dialect}.
237
+ Represented as a {JSI::Schema::Dialect}.
238
238
 
239
239
 
240
- - ### vocabulary
240
+ ### vocabulary
241
241
 
242
- [vocabulary]: #vocabulary
242
+ [vocabulary]: #vocabulary
243
243
 
244
- A vocabulary is one part of a [dialect]'s definition of schema keywords and behaviors. Dialects are composed of one or more vocabularies.
244
+ A vocabulary is one part of a [dialect]'s definition of schema keywords and behaviors. Dialects are composed of one or more vocabularies.
245
245
 
246
- A dialect whose specification does not define vocabularies is implemented using one vocabulary. Vocabularies were not defined for JSON Schema up to draft 07.
246
+ A dialect whose specification does not define vocabularies is implemented using one vocabulary. Vocabularies were not defined for JSON Schema up to draft 07.
247
247
 
248
- Represented as a {JSI::Schema::Vocabulary}.
248
+ Represented as a {JSI::Schema::Vocabulary}.
249
249
 
250
250
 
251
- - ### resource
251
+ ### resource
252
252
 
253
- [resource]: #resource
253
+ [resource]: #resource
254
254
 
255
- A resource, or schema resource, is either:
255
+ A resource, or schema resource, is either:
256
256
 
257
- - A [schema] that is identified by an absolute URI (typically declared with an id keyword)
258
- - The root of a document containing schemas, whether or not the root is itself a schema. (Technically the root of any document can be considered a resource, but it is only useful when the document contains schemas.)
257
+ - A [schema] that is identified by an absolute URI (typically declared with an id keyword)
258
+ - The root of a document containing schemas, whether or not the root is itself a schema. (Technically the root of any document can be considered a resource, but it is only useful when the document contains schemas.)
259
259
 
260
- For a given node, its *resource root* is the nearest ancestor that is a resource - this is distinct from the [root] node of the whole document.
260
+ For a given node, its *resource root* is the nearest ancestor that is a resource - this is distinct from the [root] node of the whole document.
261
261
 
262
- Relative URIs and [pointer]s used by a schema (e.g. in `$ref` or `$id`) are resolved relative to its resource root and that resource's id.
262
+ Relative URIs and [pointer]s used by a schema (e.g. in `$ref` or `$id`) are resolved relative to its resource root and that resource's id.
263
263
 
264
- See {JSI::Schema#schema_resource_root}.
264
+ See {JSI::Schema#schema_resource_root}.
265
265
 
266
266
 
267
- - ### schema application
267
+ ### schema application
268
268
 
269
- [schema application]: #schema_application
269
+ [schema application]: #schema_application
270
270
 
271
- The computation of the [schema]s that apply describing a particular [node]. This involves resolving `$ref`s, choosing what conditional schemas apply (e.g. which subschema of a `oneOf` applies), and recursing down children applying child applicator schemas. The steps of this process:
271
+ The computation of the [schema]s that apply describing a particular [node]. This involves resolving `$ref`s, choosing what conditional schemas apply (e.g. which subschema of a `oneOf` applies), and recursing down children applying child applicator schemas. The steps of this process:
272
272
 
273
- - **root indicated schemas**: Application begins with the schemas (usually just one schema) indicated as describing the [root]. `#new_jsi` is invoked on a {JSI::SchemaSet} of the indicated schemas, or more commonly on one schema or [schema module]. These are the root's {JSI::Base#jsi_indicated_schemas}.
274
- - **root applied schemas**: [in-place application] is performed on each of the root's indicated schemas to compute its applied schemas.
275
- - Descending from the root to the given node, for each [token] of the node's [pointer]:
276
- - **child indicated schemas**: [child application] is performed on each applied schema of the parent on the current token. This results in the child's indicated schemas.
277
- - **child applied schemas**: [in-place application] is performed on each of the child's indicated schemas to compute its applied schemas.
273
+ - **root indicated schemas**: Application begins with the schemas (usually just one schema) indicated as describing the [root]. `#new_jsi` is invoked on a {JSI::SchemaSet} of the indicated schemas, or more commonly on one schema or [schema module]. These are the root's {JSI::Base#jsi_indicated_schemas}.
274
+ - **root applied schemas**: [in-place application] is performed on each of the root's indicated schemas to compute its applied schemas.
275
+ - Descending from the root to the given node, for each [token] of the node's [pointer]:
276
+ - **child indicated schemas**: [child application] is performed on each applied schema of the parent on the current token. This results in the child's indicated schemas.
277
+ - **child applied schemas**: [in-place application] is performed on each of the child's indicated schemas to compute its applied schemas.
278
278
 
279
- The schemas that apply describing the node are the result of the final in-place application.
279
+ The schemas that apply describing the node are the result of the final in-place application.
280
280
 
281
281
 
282
- - ### child application
282
+ ### child application
283
283
 
284
- [child application]: #child_application
284
+ [child application]: #child_application
285
285
 
286
- The computation of subschemas of a given schema that describe a [child] of an instance on a given [token]. These come from subschemas defined on child applicator keywords such as `properties` and `items`. The result may be an empty schema set if no such keywords are present or none apply.
286
+ The computation of subschemas of a given schema that describe a [child] of an instance on a given [token]. These come from subschemas defined on child applicator keywords such as `properties` and `items`. The result may be an empty schema set if no such keywords are present or none apply.
287
287
 
288
288
 
289
- - ### in-place application
289
+ ### in-place application
290
290
 
291
- [in-place application]: #in_place_application
291
+ [in-place application]: #in_place_application
292
292
 
293
- The expansion of a schema to a set of **applied schemas** for a given instance. "In-place" means all the schemas apply to the same location in the instance, in contrast to [child application]. This is a recursive process.
293
+ The expansion of a schema to a set of **applied schemas** for a given instance. "In-place" means all the schemas apply to the same location in the instance, in contrast to [child application]. This is a recursive process.
294
294
 
295
- - If the schema contains a `$ref` keyword, *and* the specification for the schema is draft-07 or older:
296
- - The reference is resolved.
297
- - In-place application recurses on the resolved schema.
298
- - The rest of the schema is ignored. The schema does not apply itself, and any other applicator keywords are ignored (none should be present).
295
+ - If the schema contains a `$ref` keyword, *and* the specification for the schema is draft-07 or older:
296
+ - The reference is resolved.
297
+ - In-place application recurses on the resolved schema.
298
+ - The rest of the schema is ignored. The schema does not apply itself, and any other applicator keywords are ignored (none should be present).
299
299
 
300
- The resulting applied schemas are the resolved schema's in-place applicator schemas.
300
+ The resulting applied schemas are the resolved schema's in-place applicator schemas.
301
301
 
302
- - Otherwise:
303
- - The schema applies itself (it is added to the set of applied schemas).
304
- - Any in-place applicator keywords (`anyOf`, `dependencies`, etc.) are evaluated for subschemas that apply to the instance. References are resolved from `$ref` or `$dynamicRef`, if present. For each such schema, in-place application recurses.
302
+ - Otherwise:
303
+ - The schema applies itself (it is added to the set of applied schemas).
304
+ - Any in-place applicator keywords (`anyOf`, `dependencies`, etc.) are evaluated for subschemas that apply to the instance. References are resolved from `$ref` or `$dynamicRef`, if present. For each such schema, in-place application recurses.
305
305
 
306
- The resulting applied schemas consist of each recursively applied in-place applicator schema.
306
+ The resulting applied schemas consist of each recursively applied in-place applicator schema.
307
307
 
308
308
 
309
- - ### validation
309
+ ### validation
310
310
 
311
- [validation]: #validation
311
+ [validation]: #validation
312
312
 
313
- The process of determining whether a given [instance] is valid against the [schema]s that describe it, or collecting validation errors indicating why the instance is not valid. See {JSI::Base#jsi_valid?}, {JSI::Base#jsi_validate}, {JSI::Base#jsi_valid!}, {JSI::Schema#instance_valid?}, {JSI::Schema#instance_validate}, {JSI::Schema#instance_valid!}.
313
+ The process of determining whether a given [instance] is valid against the [schema]s that describe it, or collecting validation errors indicating why the instance is not valid. See {JSI::Base#jsi_valid?}, {JSI::Base#jsi_validate}, {JSI::Base#jsi_valid!}, {JSI::Schema#instance_valid?}, {JSI::Schema#instance_validate}, {JSI::Schema#instance_valid!}.
data/lib/jsi/base.rb CHANGED
@@ -44,6 +44,7 @@ module JSI
44
44
  to_immutable: {fingerprint: false},
45
45
  }.freeze
46
46
  Conf = Struct.subclass(*conf_attrs.keys)
47
+ class Conf end
47
48
  Conf::ATTRS = conf_attrs
48
49
 
49
50
  # Configuration, shared across all nodes of a document. A JSI's {Base#jsi_conf}.
@@ -42,6 +42,7 @@ module JSI
42
42
  is_metaschema: {fingerprint: true },
43
43
  }.freeze
44
44
  Conf = Base::Conf.subclass(*conf_attrs.keys)
45
+ class Conf end
45
46
  Conf::ATTRS = Base::Conf::ATTRS.merge(conf_attrs)
46
47
 
47
48
  # {Base::Conf} with additional configuration for MetaSchemaNode.
data/lib/jsi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSI
4
- VERSION = "0.0.9".freeze
4
+ VERSION = "0.0.10".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsi-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-29 00:00:00.000000000 Z
11
+ date: 2026-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable