jsonschema_rs 0.46.10-x86_64-linux → 0.48.0-x86_64-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 +29 -1
- data/README.md +20 -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
- 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: 7b78a0c2dd99ee6a079e6e7793ab3cc488e675eb9fba3b4e002f49dffb9e260a
|
|
4
|
+
data.tar.gz: a2680091ea38311c2fbee377cd732f943c7eb25ab0825f3b7b7e14b7e3195416
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 905fede4848cf6e936e9bce0a0012f428149417822d5eb9b78d4c9ce2ffaf19a4184ec5ff7199d9a8f7747f33dca8eb0ecfde08674ced0bc011d0ef4cf5d3f28
|
|
7
|
+
data.tar.gz: 685f417d71e8c4ad5d662bc7dc180cae7705fbe827f865464fcb6ab8485afa83ed9956a2c539962c7d34588579075d77f889eac8d767f05fc8450707a7f864bf
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.48.0] - 2026-07-16
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `JSONSchema::Meta.valid?` and `JSONSchema::Meta.validate!` incorrectly accepted some Draft 2019-09 schemas that the meta-schema rejects.
|
|
10
|
+
- Integers just outside the `i64`/`u64` range incorrectly compared against numeric bounds through lossy `f64` rounding (e.g. `{"minimum" => -9223372036854775808}` accepted `-9223372036854775809`).
|
|
11
|
+
|
|
12
|
+
### Performance
|
|
13
|
+
|
|
14
|
+
- Faster `multipleOf` validation for integer instances with integer divisors, via integer arithmetic instead of floating-point modulo.
|
|
15
|
+
|
|
16
|
+
## [0.47.0] - 2026-07-08
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Optional `iter_errors(instance)` method on custom keyword validators for reporting multiple errors from a single keyword. [#1071](https://github.com/Stranger6667/jsonschema/discussions/1071)
|
|
21
|
+
|
|
22
|
+
### Performance
|
|
23
|
+
|
|
24
|
+
- Faster validator construction, via compile-time meta-schema validators.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- `type` under `items` asserted with the Validation vocabulary disabled.
|
|
29
|
+
- Disabled vocabularies ignored for `$ref` targets without their own `$schema` (e.g. `$defs` entries).
|
|
30
|
+
|
|
5
31
|
## [0.46.10] - 2026-07-05
|
|
6
32
|
|
|
7
33
|
### Fixed
|
|
@@ -149,7 +175,9 @@
|
|
|
149
175
|
|
|
150
176
|
- Initial public release
|
|
151
177
|
|
|
152
|
-
[Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.
|
|
178
|
+
[Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.0...HEAD
|
|
179
|
+
[0.48.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.47.0...ruby-v0.48.0
|
|
180
|
+
[0.47.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.46.10...ruby-v0.47.0
|
|
153
181
|
[0.46.10]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.46.9...ruby-v0.46.10
|
|
154
182
|
[0.46.9]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.46.8...ruby-v0.46.9
|
|
155
183
|
[0.46.8]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.46.7...ruby-v0.46.8
|
data/README.md
CHANGED
|
@@ -148,7 +148,26 @@ Each custom keyword class must implement:
|
|
|
148
148
|
- `initialize(parent_schema, value, schema_path)` - called during schema compilation
|
|
149
149
|
- `validate(instance)` - raise on failure, return normally on success
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
A class may also implement `iter_errors(instance)`, returning an array of exceptions, to report several problems from one keyword. `each_error` then surfaces each of them; when the method is absent it falls back to the single error from `validate`:
|
|
152
|
+
|
|
153
|
+
```ruby
|
|
154
|
+
class AllPositive
|
|
155
|
+
def initialize(parent_schema, value, schema_path); end
|
|
156
|
+
|
|
157
|
+
def validate(instance)
|
|
158
|
+
first_error = iter_errors(instance).first
|
|
159
|
+
raise first_error if first_error
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def iter_errors(instance)
|
|
163
|
+
return [] unless instance.is_a?(Array)
|
|
164
|
+
instance.each_index.select { |i| instance[i].negative? }
|
|
165
|
+
.map { |i| ArgumentError.new("item #{i} is negative") }
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
When `validate` raises, the original exception is preserved as the `cause` of the `ValidationError`, so callers can inspect it (errors from `iter_errors` keep their exception as `cause` in the same way):
|
|
152
171
|
|
|
153
172
|
```ruby
|
|
154
173
|
begin
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/jsonschema/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.48.0
|
|
5
5
|
platform: x86_64-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-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bigdecimal
|