jsonschema_rs 0.49.5-aarch64-linux → 0.49.7-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: 4769283677c6dd78d9fee5a261b092dc3c1988f0b5c3719294a6d35b47b8f3e7
4
- data.tar.gz: 5f722cec6c6a475dc6e30db09e64c9c226bfa51858204ddd04177f1d64c91713
3
+ metadata.gz: 21fc3926e4d172494ed5ecf163f1d5b6cb3924ce9984a7900aed12fda4fe6bc0
4
+ data.tar.gz: facbbb0fd9b0e20a71e47a23db0b4cf1489c5f5ec0729fd2b4986452363a66b2
5
5
  SHA512:
6
- metadata.gz: 4084ff4aaf896f59841e10c18967244a4d77342a5bc44e88f68ae0f579c7affc2ef2d136d6c2233f894a9d0162a977880c1492ec744662734063dadaecc26da6
7
- data.tar.gz: 5c5ea50c3291595e8e8b80e0214b6bd2e780e1aaa8b5404593550c5cbfa3462b08af998d2f97e9f0a1be17b7772e4c1ab0aa6be87ca8b5e95ac053646bd4342e
6
+ metadata.gz: ad81552ed6ddfab8e6af9b3658215a3f47140b17a189d0289bbaff0c43ced292f871655bdd043ad445788c9ae90c057c856b24bd3f7bc95d2061737887851022
7
+ data.tar.gz: edb3f852f083cd7167b1c0bbf7d35f0bbfddba718c10d4e3f79a263f63566de0efb6751baab1e6f24edda9668ae055db61ca671072fc0bcf3ced312b4933d794
data/CHANGELOG.md CHANGED
@@ -2,6 +2,64 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.49.7] - 2026-08-08
6
+
7
+ ### Added
8
+
9
+ - `retriever`, `registry`, and `base_uri` keyword arguments to `JSONSchema.canonicalize`.
10
+ - Canonicalization of a `oneOf` whose branches name disjoint targets, which degrades to a union.
11
+ - Canonicalization of a vacuous `patternProperties` entry beside schema-valued `additionalProperties`, where matching keys escape its value constraint.
12
+ - Canonicalization of a Draft 4 closed pattern map with a reference nested under a property.
13
+ - Canonicalization of Draft 4 closed pattern maps that meet through an applicator.
14
+ - The complement of a reference back to a target already being negated, which stays symbolic instead of declining.
15
+ - `CanonicalSchema#definition` resolving `#` to the document the schema was read against.
16
+
17
+ ### Performance
18
+
19
+ - Up to 150x faster canonicalization of `not` over a union of many branches.
20
+ - 2% faster emission of canonical schemas, which no longer formats copied string values.
21
+ - 5% faster emission of canonical schemas, which no longer formats object keys while copying them.
22
+ - Up to 12% faster canonicalization of schemas that repeatedly intersect the same branches.
23
+ - 13% faster canonicalization of a non-dynamic OpenAPI document, which no longer scans every schema object for dynamic references.
24
+ - Faster canonicalization of schemas with local `$defs` references, which avoid decoding unescaped definition names.
25
+ - 23% faster canonicalization of an object whose keys a finite property-name set spells.
26
+ - 3% faster intersection of schemas where one side constrains nothing.
27
+ - Up to 31x faster canonicalization of a `oneOf` whose many branches overlap.
28
+ - Up to 14x faster canonicalization of a union whose object branches share no values.
29
+ - 7% faster canonicalization of schemas that reach the same pair of nodes repeatedly.
30
+ - 5% faster canonicalization of objects, whose property maps no longer reach the allocator.
31
+ - Up to 8% faster canonicalization of schemas that reach `true` and `false` subschemas repeatedly.
32
+ - 2% faster canonicalization of schemas that assert known string formats.
33
+
34
+ ### Fixed
35
+
36
+ - `CanonicalSchema#definition` and `CanonicalSchema#definitions` handing out a target that names the document root without that document, where `#` points at the target instead.
37
+ - An `items` tail beyond an array's length ceiling surviving canonicalization, where it governs no element.
38
+ - `CanonicalSchema#to_json_schema` leaving the document root out of a node emitted below it, where `#` points at that node instead.
39
+
40
+ ## [0.49.6] - 2026-08-06
41
+
42
+ ### Added
43
+
44
+ - Canonicalization of a negated `uniqueItems`, where the complement demands a repeated element under the length floor two elements imply.
45
+ - Canonicalization of a negated array tuple, where each position's complement stands under the length that reaches it.
46
+ - Canonicalization of `contains` demands sharing no value, where their counts add up into a length floor.
47
+ - `CanonicalSchema#negate` through references, where the complement of the resolved target takes the reference's place.
48
+ - Canonicalization of negated `propertyNames` and `additionalProperties`, where the complement spells the violating-key demand instead of a `not` residual.
49
+ - Canonicalization of negated `additionalProperties` under Draft 4, where the violating-key demand spells the closed property map.
50
+ - Canonicalization of `not` a reference, where the complement of the resolved target takes the pointer's place.
51
+ - Canonicalization of a negated `oneOf`, where the complement spells the values no branch admits beside the values two branches share.
52
+ - Canonicalization of negated `items` under Draft 4, where the violating-element demand spells the barred element schema.
53
+
54
+ ### Changed
55
+
56
+ - `ArrayView` reports distinctness in three states, so an array demanding a repeated element reads apart from one demanding distinct elements.
57
+
58
+ ### Fixed
59
+
60
+ - `CanonicalSchema#negate` keeping a root self-reference in the complement, where it points at the complement instead of the source.
61
+ - An `additionalItems` that tails no tuple keeping the whole document unmodeled under Draft 2020-12.
62
+
5
63
  ## [0.49.5] - 2026-08-05
6
64
 
7
65
  ### Added
@@ -304,7 +362,9 @@
304
362
 
305
363
  - Initial public release
306
364
 
307
- [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.5...HEAD
365
+ [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.7...HEAD
366
+ [0.49.7]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.6...ruby-v0.49.7
367
+ [0.49.6]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.5...ruby-v0.49.6
308
368
  [0.49.5]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.4...ruby-v0.49.5
309
369
  [0.49.4]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.3...ruby-v0.49.4
310
370
  [0.49.3]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.2...ruby-v0.49.3
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.49.5"
4
+ VERSION = "0.49.7"
5
5
  end
data/sig/jsonschema.rbs CHANGED
@@ -121,7 +121,7 @@ module JSONSchema
121
121
  class ArrayView
122
122
  def min_items: () -> Integer?
123
123
  def max_items: () -> Integer?
124
- def unique_items: () -> bool
124
+ def distinctness: () -> (:unconstrained | :all_distinct | :some_repeated)
125
125
  def prefix_items: () -> Array[CanonicalSchema]
126
126
  def items: () -> CanonicalSchema?
127
127
  def contains: () -> Array[ContainsView]
@@ -146,6 +146,24 @@ module JSONSchema
146
146
  def property_names: () -> CanonicalSchema?
147
147
  def properties: () -> Hash[String, CanonicalSchema]
148
148
  def pattern_properties: () -> Hash[String, CanonicalSchema]
149
+ def additional_properties: () -> CanonicalSchema?
150
+ def violations: () -> Array[NameFailsView | UndeclaredValueFailsView]
151
+ def inspect: () -> String
152
+ def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
153
+ end
154
+
155
+ # Some key's name fails the schema.
156
+ class NameFailsView
157
+ def schema: () -> CanonicalSchema
158
+ def inspect: () -> String
159
+ def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
160
+ end
161
+
162
+ # Some key outside `names` and matching none of `patterns` has a value failing `additional`.
163
+ class UndeclaredValueFailsView
164
+ def names: () -> Array[String]
165
+ def patterns: () -> Array[String]
166
+ def additional: () -> CanonicalSchema
149
167
  def inspect: () -> String
150
168
  def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
151
169
  end
@@ -184,7 +202,10 @@ module JSONSchema
184
202
  untyped schema,
185
203
  ?draft: draft?,
186
204
  ?validate_formats: bool?,
187
- ?pattern_options: (RegexOptions | FancyRegexOptions)?
205
+ ?pattern_options: (RegexOptions | FancyRegexOptions)?,
206
+ ?retriever: (^(String) -> untyped)?,
207
+ ?registry: Registry?,
208
+ ?base_uri: String?
188
209
  ) -> Canonical::CanonicalSchema
189
210
 
190
211
  # Create a validator with auto-detected draft version.
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.49.5
4
+ version: 0.49.7
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-08-04 00:00:00.000000000 Z
11
+ date: 2026-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal