jsonschema_rs 0.48.5-aarch64-linux → 0.49.0-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: cf692a11080432d9a25f6147700f9f66a4208d6d274871feac46adb3d3c13abe
4
- data.tar.gz: 7df41808ba9b11907bc566000f5f1362b9630967a33aedafea040bb099d2167e
3
+ metadata.gz: 30cf2dd3523b8236e0174b8428b54dd5be86de34f3ba139afd88a0fe89cd5f07
4
+ data.tar.gz: ecb2e8de4b3188c94572d658e24ba39846431d4c9a2d7e48a9ed0a0b0c80117e
5
5
  SHA512:
6
- metadata.gz: df8d7658947842bb585c6284b822acf7fbb610914b2fab5e53924562ce452544f1aeae2fe7274c18f48f796ded95c10e93349ae461fdd21f3289c04f34ba7834
7
- data.tar.gz: ed26651082b8426ed286098aa90ae06fd6a9afb16bdc2948b651cef1b94d667165e99e28d8074a4dd0758504c52dc21d7753d3dc2161b1da3e51cfd40190831d
6
+ metadata.gz: be97e1d4b66273b68874d74a48386047b5504800ed679a434013db70d92d3a7178bf86d8f9bd9e5099d8aff2913ef809130644cb3e8ba3ead95142f3bf3d476c
7
+ data.tar.gz: 3d60a91a48228513758279430d71b100301e6b54d6631fe15b7ec7835bcfe83e0b29d5d530e66df324790385afd0255598f70cfdce4c94c3858bf5934352e6a7
data/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.49.0] - 2026-07-25
6
+
7
+ ### Added
8
+
9
+ - **EXPERIMENTAL**: Schema canonicalization via `jsonschema::canonicalize`. It reduces a reasonable subset of JSON Schemas to their normal forms.
10
+ - Validation of recursive Ruby objects.
11
+
12
+ ### Changed
13
+
14
+ - Invalid UTF-8, unsupported types, and nesting past the depth limit are reported only where a keyword reads the value.
15
+ - A hash keyed by both `:name` and `"name"` counts two properties (it previously collapsed them into one).
16
+
17
+ ### Fixed
18
+
19
+ - `multipleOf` incorrectly accepted integers past `u64` that are not multiples of the divisor.
20
+
21
+ ### Performance
22
+
23
+ - Up to 3x faster validation by working on Ruby objects directly instead of converting them to `serde_json`. [#239](https://github.com/Stranger6667/jsonschema/issues/239)
24
+
5
25
  ## [0.48.5] - 2026-07-22
6
26
 
7
27
  ### Performance
@@ -199,7 +219,8 @@
199
219
 
200
220
  - Initial public release
201
221
 
202
- [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.5...HEAD
222
+ [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.0...HEAD
223
+ [0.49.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.5...ruby-v0.49.0
203
224
  [0.48.5]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.2...ruby-v0.48.5
204
225
  [0.48.2]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.1...ruby-v0.48.2
205
226
  [0.48.1]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.48.0...ruby-v0.48.1
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.48.5"
4
+ VERSION = "0.49.0"
5
5
  end
data/sig/jsonschema.rbs CHANGED
@@ -16,11 +16,12 @@ module JSONSchema
16
16
  end
17
17
 
18
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
19
+ type kind = :multi_type | :typed_group | :string | :integer | :number | :array
20
+ | :object | :const | :enum | :any_of | :true | :false | :raw
21
21
 
22
22
  type view = TrueView | FalseView | MultiTypeView | TypedGroupView | StringView
23
- | IntegerView | AnyOfView | ConstView | EnumView | RawView
23
+ | IntegerView | NumberView | ArrayView | ObjectView | AnyOfView
24
+ | ConstView | EnumView | RawView
24
25
 
25
26
  class CanonicalizationError < StandardError
26
27
  end
@@ -70,14 +71,62 @@ module JSONSchema
70
71
  def min_length: () -> Integer?
71
72
  def max_length: () -> Integer?
72
73
  def patterns: () -> Array[String]
74
+ def formats: () -> Array[String]
75
+ def content_media_types: () -> Array[String]
76
+ def content_encodings: () -> Array[String]
73
77
  def inspect: () -> String
74
78
  def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
75
79
  end
76
80
 
77
- # An integer value within a closed interval.
81
+ # A number value within a real interval.
82
+ class NumberView
83
+ def minimum: () -> (Integer | Float)?
84
+ def exclusive_minimum: () -> bool
85
+ def maximum: () -> (Integer | Float)?
86
+ def exclusive_maximum: () -> bool
87
+ def multiple_of: () -> Array[Integer | Float]
88
+ def inspect: () -> String
89
+ def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
90
+ end
91
+
92
+ # An integer value within a closed interval, optionally a multiple of a divisor.
78
93
  class IntegerView
79
94
  def minimum: () -> Integer?
80
95
  def maximum: () -> Integer?
96
+ def multiple_of: () -> Array[Integer | Float]
97
+ def inspect: () -> String
98
+ def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
99
+ end
100
+
101
+ # An array value whose length is within a window.
102
+ class ArrayView
103
+ def min_items: () -> Integer?
104
+ def max_items: () -> Integer?
105
+ def unique_items: () -> bool
106
+ def prefix_items: () -> Array[CanonicalSchema]
107
+ def items: () -> CanonicalSchema?
108
+ def contains: () -> Array[ContainsView]
109
+ def inspect: () -> String
110
+ def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
111
+ end
112
+
113
+ # One `contains` demand of an array; an absent minimum spells the default of one.
114
+ class ContainsView
115
+ def schema: () -> CanonicalSchema
116
+ def min_contains: () -> Integer?
117
+ def max_contains: () -> Integer?
118
+ def inspect: () -> String
119
+ def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
120
+ end
121
+
122
+ # An object value whose property count is within a window.
123
+ class ObjectView
124
+ def min_properties: () -> Integer?
125
+ def max_properties: () -> Integer?
126
+ def required: () -> Array[String]
127
+ def property_names: () -> CanonicalSchema?
128
+ def properties: () -> Hash[String, CanonicalSchema]
129
+ def pattern_properties: () -> Hash[String, CanonicalSchema]
81
130
  def inspect: () -> String
82
131
  def deconstruct_keys: (untyped keys) -> Hash[Symbol, untyped]
83
132
  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.48.5
4
+ version: 0.49.0
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-22 00:00:00.000000000 Z
11
+ date: 2026-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal