jsi-dev 0.0.0.pre.commonmarker
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +8 -0
- data/CHANGELOG.md +101 -0
- data/LICENSE.md +613 -0
- data/README.md +303 -0
- data/docs/glossary.md +281 -0
- data/jsi.gemspec +30 -0
- data/lib/jsi/base/node.rb +373 -0
- data/lib/jsi/base.rb +738 -0
- data/lib/jsi/jsi_coder.rb +92 -0
- data/lib/jsi/metaschema.rb +6 -0
- data/lib/jsi/metaschema_node/bootstrap_schema.rb +126 -0
- data/lib/jsi/metaschema_node.rb +262 -0
- data/lib/jsi/ptr.rb +314 -0
- data/lib/jsi/schema/application/child_application/contains.rb +25 -0
- data/lib/jsi/schema/application/child_application/draft04.rb +21 -0
- data/lib/jsi/schema/application/child_application/draft06.rb +28 -0
- data/lib/jsi/schema/application/child_application/draft07.rb +28 -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 +13 -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 +25 -0
- data/lib/jsi/schema/application/inplace_application/draft06.rb +26 -0
- data/lib/jsi/schema/application/inplace_application/draft07.rb +32 -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 +44 -0
- data/lib/jsi/schema/application/inplace_application.rb +14 -0
- data/lib/jsi/schema/application.rb +12 -0
- data/lib/jsi/schema/draft04.rb +13 -0
- data/lib/jsi/schema/draft06.rb +13 -0
- data/lib/jsi/schema/draft07.rb +13 -0
- data/lib/jsi/schema/issue.rb +36 -0
- data/lib/jsi/schema/ref.rb +183 -0
- data/lib/jsi/schema/schema_ancestor_node.rb +122 -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/dependencies.rb +49 -0
- data/lib/jsi/schema/validation/draft04/minmax.rb +91 -0
- data/lib/jsi/schema/validation/draft04.rb +110 -0
- data/lib/jsi/schema/validation/draft06.rb +120 -0
- data/lib/jsi/schema/validation/draft07.rb +157 -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 +49 -0
- data/lib/jsi/schema.rb +792 -0
- data/lib/jsi/schema_classes.rb +357 -0
- data/lib/jsi/schema_registry.rb +190 -0
- data/lib/jsi/schema_set.rb +219 -0
- data/lib/jsi/simple_wrap.rb +26 -0
- data/lib/jsi/util/private/attr_struct.rb +130 -0
- data/lib/jsi/util/private/memo_map.rb +75 -0
- data/lib/jsi/util/private.rb +202 -0
- data/lib/jsi/util/typelike.rb +225 -0
- data/lib/jsi/util.rb +227 -0
- data/lib/jsi/validation/error.rb +34 -0
- data/lib/jsi/validation/result.rb +212 -0
- data/lib/jsi/validation.rb +15 -0
- data/lib/jsi/version.rb +5 -0
- data/lib/jsi.rb +105 -0
- data/lib/schemas/json-schema.org/draft-04/schema.rb +169 -0
- data/lib/schemas/json-schema.org/draft-06/schema.rb +171 -0
- data/lib/schemas/json-schema.org/draft-07/schema.rb +198 -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 +155 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 062d1051fd64fbdc8ed611428ed398ceea4da742882522dc1c098567c06c8e79
|
4
|
+
data.tar.gz: 12ac31b12bbb9a9b664daa31b7a90196c79af92b2c2679ebc490e2cb629966b8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4dba1476f4a234cc3a979e2620dcf45795a7ff04229a03016717219599478eb32991f2266459303f625951ea018a3992a16845649c6601e1e17a81cf84b59ea4
|
7
|
+
data.tar.gz: 7a44e5200a07d0707fac7046f6023ad81294ce68a8c179eec25209896c394ed9250a63c34a8d14c456920c6a92d6bbdcded94c610cfaf73946b674a753bae1cc
|
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
# v0.7.0
|
2
|
+
|
3
|
+
- JSI::Base instances include Array/Hash-like modules on subclasses rather than extending each instance; are only Enumerable when appropriate instead of always
|
4
|
+
- PathedHashNode -> Base::HashNode, PathedArrayNode -> Base::ArrayNode, PathedNode merged with Base
|
5
|
+
- change application of conditional schemas to instances which do not validate, always apply them
|
6
|
+
- fix nomenclature: child is immediately below parent; descendent is anywhere at/below an ancestor
|
7
|
+
- deprecate previous misnamed methods
|
8
|
+
- Base#jsi_descendent_node, Base#jsi_ancestor_nodes
|
9
|
+
- add Schema#describes_schema!, deprecate Schema#jsi_schema_instance_modules
|
10
|
+
- Schema#keyword?
|
11
|
+
- Base#jmespath_search
|
12
|
+
- MetaschemaNode keeps its jsi_root_node (reducing an enormous number of unnecessary instantiations of MetaschemaNode)
|
13
|
+
- /metaschema_instance_modules/schema_implementation_modules/
|
14
|
+
- separate JSI::Util (public) and JSI::Util::Private
|
15
|
+
- support ruby 3
|
16
|
+
- Schema.default_metaschema is nil unless set by the application
|
17
|
+
- deprecate JSI::Typelike module, merged with Util; Arraylike -> Util::Arraylike, Hashlike -> Util::Hashlike
|
18
|
+
|
19
|
+
# v0.6.0
|
20
|
+
|
21
|
+
- initial validation; remove gem `json-schema` dependency
|
22
|
+
- initial schema issue collection
|
23
|
+
- JSI.new_schema / new_schema_module
|
24
|
+
- JSI::SchemaSet
|
25
|
+
- JSI::SchemaRegistry
|
26
|
+
- JSI::Schema::Ref
|
27
|
+
- Base#jsi_each_child_node, jsi_select_children_node_first, jsi_select_children_leaf_first
|
28
|
+
- JSI::JSON::Pointer → JSI::Ptr
|
29
|
+
- deprecate JSI.class_for_schemas
|
30
|
+
- remove test/development files from gem
|
31
|
+
- remove JSI::JSON::Node
|
32
|
+
- as always too much more to list
|
33
|
+
|
34
|
+
# v0.4.0
|
35
|
+
|
36
|
+
- a JSI::Base has multiple jsi_schemas https://github.com/notEthan/jsi/pull/88
|
37
|
+
- JSI.class_for_schemas replaces JSI.class_for_schema
|
38
|
+
- fix uri/fragment nomenclature https://github.com/notEthan/jsi/pull/89
|
39
|
+
|
40
|
+
# v0.3.0
|
41
|
+
|
42
|
+
- a schema is a JSI instance of a metaschema
|
43
|
+
- module JSI::Schema
|
44
|
+
- module JSI::Metaschema
|
45
|
+
- class JSI::MetaschemaNode
|
46
|
+
- JSI::JSON::Node breaking changes
|
47
|
+
- module SimpleWrap https://github.com/notEthan/jsi/pull/87
|
48
|
+
|
49
|
+
# v0.2.1
|
50
|
+
|
51
|
+
- bugfix JSI::Schema#described_object_property_names looks only at allOf, not oneOf/anyOf
|
52
|
+
- rm unused Schema#default_value, #default_value?
|
53
|
+
- misc
|
54
|
+
|
55
|
+
# v0.2.0
|
56
|
+
|
57
|
+
- JSI::PathedNode unifies interfaces of JSI::Base, JSI::JSON::Node
|
58
|
+
- JSI::Base does not (generally) wrap a JSI::JSON::Node
|
59
|
+
- some method renames to try to better indicate what a method applies to, and unreserve common names
|
60
|
+
- JSI::Base
|
61
|
+
- #instance -> #jsi_instance
|
62
|
+
- #parents -> #parent_jsis, #parent -> #parent_jsi
|
63
|
+
- JSI::Schema
|
64
|
+
- #fully_validate -> #fully_validate_instance
|
65
|
+
- #validate -> #validate_instance
|
66
|
+
- #validate! -> #validate_instance!
|
67
|
+
- improvements to methods which use a modified copy - #dup, #update/#merge
|
68
|
+
- #deref on PathedNode classes uses a block form
|
69
|
+
- JSI::PathedArrayNode, PathedHashNode
|
70
|
+
- JSI::JSON::Pointer refactoring and improvement
|
71
|
+
- Schema#new_jsi
|
72
|
+
- JSI::SimpleWrap
|
73
|
+
- more
|
74
|
+
|
75
|
+
# v0.1.0
|
76
|
+
|
77
|
+
- JSI::JSON::Pointer replaces monkey-patched-in ::JSON::Schema::Pointer
|
78
|
+
- JSI::JSICoder replaces JSI::SchemaInstanceJSONCoder / ObjectJSONCoder
|
79
|
+
- remove JSI::StructJSONCoder
|
80
|
+
- misc improvements to code, doc, tests
|
81
|
+
|
82
|
+
# v0.0.4
|
83
|
+
|
84
|
+
- minor bugfixes / improvements
|
85
|
+
|
86
|
+
# v0.0.3
|
87
|
+
|
88
|
+
- JSI::Base returns an instance of the default value for the schema if applicable
|
89
|
+
- JSI::Base instance method #class_for_schema may be overridden by subclasses
|
90
|
+
- bugfixes and internal refactoring
|
91
|
+
|
92
|
+
# v0.0.2
|
93
|
+
|
94
|
+
- JSI::JSON::Node and other utilities duck-type better with #to_hash and #to_ary
|
95
|
+
- much improved documentation
|
96
|
+
- much improved test coverage
|
97
|
+
- code improvements too numerous to list
|
98
|
+
|
99
|
+
# v0.0.1
|
100
|
+
|
101
|
+
- extracted JSI from Scorpio
|