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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ec1d6143eb3a20998a7af7604a726ec87149287a20dbedce52c0e46d538b784
4
- data.tar.gz: ec898777d01d26655366c121f9a5ccb268dba642d2889a53d9d17890381bd5e8
3
+ metadata.gz: 7b78a0c2dd99ee6a079e6e7793ab3cc488e675eb9fba3b4e002f49dffb9e260a
4
+ data.tar.gz: a2680091ea38311c2fbee377cd732f943c7eb25ab0825f3b7b7e14b7e3195416
5
5
  SHA512:
6
- metadata.gz: 9d74539c8bb000d121ea769d602aa816f4031a7894920c1811b87674f16430d6e46666d6fc29a60bfb2f80d1b81ec4b27fb3255761d1d468c66f88362d861727
7
- data.tar.gz: e9efa4ad9261a0f089ac2cccbc590e84d494ff19fa2beda9af88feb2efa1be031dc2c7054f538688961a19514c931e52de146c6aa4f29dce1fe80d14e9684a60
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.46.10...HEAD
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
- When `validate` raises, the original exception is preserved as the `cause` of the `ValidationError`, so callers can inspect it:
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSONSchema
4
- VERSION = "0.46.10"
4
+ VERSION = "0.48.0"
5
5
  end
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.46.10
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-05 00:00:00.000000000 Z
11
+ date: 2026-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal