jsonschema_rs 0.48.2-aarch64-linux → 0.48.5-aarch64-linux
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 +4 -4
- data/CHANGELOG.md +9 -1
- data/lib/jsonschema/3.3/jsonschema_rb.so +0 -0
- data/lib/jsonschema/3.4/jsonschema_rb.so +0 -0
- data/lib/jsonschema/4.0/jsonschema_rb.so +0 -0
- data/lib/jsonschema/version.rb +1 -1
- data/sig/jsonschema.rbs +102 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf692a11080432d9a25f6147700f9f66a4208d6d274871feac46adb3d3c13abe
|
|
4
|
+
data.tar.gz: 7df41808ba9b11907bc566000f5f1362b9630967a33aedafea040bb099d2167e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df8d7658947842bb585c6284b822acf7fbb610914b2fab5e53924562ce452544f1aeae2fe7274c18f48f796ded95c10e93349ae461fdd21f3289c04f34ba7834
|
|
7
|
+
data.tar.gz: ed26651082b8426ed286098aa90ae06fd6a9afb16bdc2948b651cef1b94d667165e99e28d8074a4dd0758504c52dc21d7753d3dc2161b1da3e51cfd40190831d
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.48.5] - 2026-07-22
|
|
6
|
+
|
|
7
|
+
### Performance
|
|
8
|
+
|
|
9
|
+
- Avoid map lookups in some `properties` validators.
|
|
10
|
+
- Faster validation of `{"type": "array", "items": {...}}` schemas.
|
|
11
|
+
|
|
5
12
|
## [0.48.2] - 2026-07-21
|
|
6
13
|
|
|
7
14
|
### Fixed
|
|
@@ -192,7 +199,8 @@
|
|
|
192
199
|
|
|
193
200
|
- Initial public release
|
|
194
201
|
|
|
195
|
-
[Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.
|
|
202
|
+
[Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.5...HEAD
|
|
203
|
+
[0.48.5]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.2...ruby-v0.48.5
|
|
196
204
|
[0.48.2]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.1...ruby-v0.48.2
|
|
197
205
|
[0.48.1]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.0...ruby-v0.48.1
|
|
198
206
|
[0.48.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.47.0...ruby-v0.48.0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/jsonschema/version.rb
CHANGED
data/sig/jsonschema.rbs
CHANGED
|
@@ -14,8 +14,110 @@ module JSONSchema
|
|
|
14
14
|
# Main use case: deduplicate equivalent JSON Schemas by using a stable string form.
|
|
15
15
|
def self.to_string: (untyped object) -> String
|
|
16
16
|
end
|
|
17
|
+
|
|
18
|
+
# Structural discriminant of a canonical schema, one per view class.
|
|
19
|
+
type kind = :multi_type | :typed_group | :string | :integer | :const | :enum
|
|
20
|
+
| :any_of | :true | :false | :raw
|
|
21
|
+
|
|
22
|
+
type view = TrueView | FalseView | MultiTypeView | TypedGroupView | StringView
|
|
23
|
+
| IntegerView | AnyOfView | ConstView | EnumView | RawView
|
|
24
|
+
|
|
25
|
+
class CanonicalizationError < StandardError
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class InvalidSchemaType < CanonicalizationError
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# A schema reduced to canonical form: schemas accepting the same values share one form.
|
|
32
|
+
class CanonicalSchema
|
|
33
|
+
def to_json_schema: () -> untyped
|
|
34
|
+
def draft: () -> JSONSchema::draft
|
|
35
|
+
def kind: () -> kind
|
|
36
|
+
def view: () -> view
|
|
37
|
+
def definitions: () -> Hash[String, CanonicalSchema]
|
|
38
|
+
def satisfiable?: () -> bool
|
|
39
|
+
def inspect: () -> String
|
|
40
|
+
def ==: (untyped other) -> bool
|
|
41
|
+
def eql?: (untyped other) -> bool
|
|
42
|
+
def hash: () -> Integer
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Matches any value.
|
|
46
|
+
class TrueView
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Matches no value.
|
|
50
|
+
class FalseView
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# A value matches iff its JSON type is in the set.
|
|
54
|
+
class MultiTypeView
|
|
55
|
+
def types: () -> Array[Symbol]
|
|
56
|
+
def inspect: () -> String
|
|
57
|
+
def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# A value matches iff its JSON type is `type_name` and it satisfies `body`.
|
|
61
|
+
class TypedGroupView
|
|
62
|
+
def type_name: () -> Symbol
|
|
63
|
+
def body: () -> CanonicalSchema
|
|
64
|
+
def inspect: () -> String
|
|
65
|
+
def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# A string value within a length window, matching every pattern.
|
|
69
|
+
class StringView
|
|
70
|
+
def min_length: () -> Integer?
|
|
71
|
+
def max_length: () -> Integer?
|
|
72
|
+
def patterns: () -> Array[String]
|
|
73
|
+
def inspect: () -> String
|
|
74
|
+
def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# An integer value within a closed interval.
|
|
78
|
+
class IntegerView
|
|
79
|
+
def minimum: () -> Integer?
|
|
80
|
+
def maximum: () -> Integer?
|
|
81
|
+
def inspect: () -> String
|
|
82
|
+
def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# A value matches iff at least one branch matches.
|
|
86
|
+
class AnyOfView
|
|
87
|
+
def branches: () -> Array[CanonicalSchema]
|
|
88
|
+
def inspect: () -> String
|
|
89
|
+
def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Exactly one admitted value.
|
|
93
|
+
class ConstView
|
|
94
|
+
def value: () -> untyped
|
|
95
|
+
def inspect: () -> String
|
|
96
|
+
def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# A sorted, deduplicated finite set of admitted values.
|
|
100
|
+
class EnumView
|
|
101
|
+
def values: () -> Array[untyped]
|
|
102
|
+
def inspect: () -> String
|
|
103
|
+
def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# A schema the canonical form does not model structurally, kept verbatim.
|
|
107
|
+
class RawView
|
|
108
|
+
def schema: () -> untyped
|
|
109
|
+
def inspect: () -> String
|
|
110
|
+
def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
|
|
111
|
+
end
|
|
17
112
|
end
|
|
18
113
|
|
|
114
|
+
# Reduce a schema to its canonical form.
|
|
115
|
+
def self.canonicalize: (
|
|
116
|
+
untyped schema,
|
|
117
|
+
?draft: draft?,
|
|
118
|
+
?validate_formats: bool?
|
|
119
|
+
) -> Canonical::CanonicalSchema
|
|
120
|
+
|
|
19
121
|
# Create a validator with auto-detected draft version.
|
|
20
122
|
#
|
|
21
123
|
# @param schema The JSON Schema (Hash or JSON string)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jsonschema_rs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.48.
|
|
4
|
+
version: 0.48.5
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Dmitry Dygalo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bigdecimal
|