jsonschema_rs 0.42.1-aarch64-linux → 0.42.2-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26cfb686c971c5e0c4a25212f42eceb8333970336f4f31c0e886a35d631be346
4
- data.tar.gz: d9fe14727791d22a1ad61c19fe86421724ae318608fe217a832090ec3fac141c
3
+ metadata.gz: 021caf2f915f392daf60de381ba97591416e2bbdf1a62373d3d9290b88f8e095
4
+ data.tar.gz: 918d7d998823717abcce53e3b08ced90567025a535d5888332d3795dddfa4419
5
5
  SHA512:
6
- metadata.gz: 4ea5ae6d30437b51c42720640fae4ce45fa01a0def944c7471eef5db7cb67f642dc2885d0471db13ed14fa88ad7681f6ddaa544956f0fe02ba8e265b02e93540
7
- data.tar.gz: '0482c6d289800bf1ff4d030bf4beb9ef9ff838a13443ffe252efd754a1d6b8a83ffd9b6dee91c2a3aafd8b9bf4049a68c3f05ba768cc671c875d2c8e2325da12'
6
+ metadata.gz: f76bc26b78ad1e70ff97ef1164c0b9f88001f010660c8cb7da90e5dc997fb0d85a503002a57bff010dee5fc98b7deb0f3446f71a71b83a1b1ddc32983d140b4f
7
+ data.tar.gz: 4634c084b338805ca2f90174c94c55dbf3bf23340c25704e02802de70db302d4c1a2521008eff8756d1228568bd77e4a844408032177b26fb26ecc0d307e2368
data/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.42.2] - 2026-02-26
6
+
7
+ ### Changed
8
+
9
+ - Custom keyword validation exceptions are now chained to the resulting `ValidationError` via `cause`, preserving the original exception class and message.
10
+
11
+ ### Fixed
12
+
13
+ - SWAR digit parser accepted bytes `:`–`?` (0x3A–0x3F) as valid digits during `date`, `time`, and `date-time` format validation, potentially allowing malformed values to pass.
14
+
15
+ ### Performance
16
+
17
+ - Extend `pattern` prefix optimization to handle escaped slashes (`^\/`) and exact-match patterns (`^\$ref$`).
18
+ - Specialize `enum` for cases when all variants are strings.
19
+
5
20
  ## [0.42.1] - 2026-02-17
6
21
 
7
22
  ### Performance
@@ -13,5 +28,6 @@
13
28
 
14
29
  - Initial public release
15
30
 
16
- [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.42.1...HEAD
31
+ [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.42.2...HEAD
32
+ [0.42.2]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.42.1...ruby-v0.42.2
17
33
  [0.42.1]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.42.0...ruby-v0.42.1
data/README.md CHANGED
@@ -147,6 +147,17 @@ Each custom keyword class must implement:
147
147
  - `initialize(parent_schema, value, schema_path)` - called during schema compilation
148
148
  - `validate(instance)` - raise on failure, return normally on success
149
149
 
150
+ When `validate` raises, the original exception is preserved as the `cause` of the `ValidationError`, so callers can inspect it:
151
+
152
+ ```ruby
153
+ begin
154
+ validator.validate!(3)
155
+ rescue JSONSchema::ValidationError => e
156
+ puts e.cause.class # => RuntimeError
157
+ puts e.cause.message # => "3 is not even"
158
+ end
159
+ ```
160
+
150
161
  ### Structured evaluation output
151
162
 
152
163
  When you need more than a boolean result, use the `evaluate` API to access the [JSON Schema Output v1](https://json-schema.org/draft/2020-12/json-schema-core#name-output-formatting) formats:
@@ -505,9 +516,9 @@ Valid draft symbols: `:draft4`, `:draft6`, `:draft7`, `:draft201909`, `:draft202
505
516
 
506
517
  `jsonschema` is designed for high performance, outperforming other Ruby JSON Schema validators in most scenarios:
507
518
 
508
- - **30-117x** faster than `json_schemer` for complex schemas and large instances
509
- - **206-473x** faster than `json-schema` where supported
510
- - **7-118x** faster than `rj_schema` (RapidJSON/C++)
519
+ - **28-148x** faster than `json_schemer` for complex schemas and large instances
520
+ - **200-567x** faster than `json-schema` where supported
521
+ - **7-130x** faster than `rj_schema` (RapidJSON/C++)
511
522
 
512
523
  For detailed benchmarks, see our [full performance comparison](https://github.com/Stranger6667/jsonschema/blob/master/crates/jsonschema-rb/BENCHMARKS.md).
513
524
 
Binary file
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.42.1"
4
+ VERSION = "0.42.2"
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.42.1
4
+ version: 0.42.2
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-02-17 00:00:00.000000000 Z
11
+ date: 2026-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal