jsonschema_rs 0.43.0-aarch64-linux → 0.44.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: 5d4195c753bb191b2bcceaaaf0d76c15cd23e5ea653202c072d132d196d61f86
4
- data.tar.gz: 9d18e23218199f65519e5606740a29d804052b83d36af4d3cd555d3fea34321c
3
+ metadata.gz: 84ea8e195e0e65bd7ef559d0935ef0b811299f95898236f639d990f9a3c117d7
4
+ data.tar.gz: 11a36ff821f4b265c03f920b72d1580d369f33345eef9db42abef6d05167b0f1
5
5
  SHA512:
6
- metadata.gz: 3a1f2be03d76f8eca400a5c6b46738229aad03cf49b79b34b36ba8f1a1c068add17e6a3f13751ef0ba74898863a18df1e69c3431591cf463cdfd5140e762cb43
7
- data.tar.gz: 817ab7546486552b78f91abb7bb16ad9edc866150c59503f2bf3bffc04f68cdc7a46417948b2239e5c70b67f95d5422bc7bf67c7219607c8d56f9b14ed915383
6
+ metadata.gz: 586985fa0231b57791b6535b1dbaf11c04e7af6a238ccee6c2efac69dc50a083f9b05c480d247fd5de46fdf33743d1e5600cc7e2a834f753faaae90d0daa24e8
7
+ data.tar.gz: b6c6e2c59bc92ef455512237929d6aee01f236141c1fe0b0ad4ef860fb0630a49d814d9b1bd1805d519ecd51fe79b5b61d0ab086672f25d82c0d802f240f5e62
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.44.0] - 2026-03-02
6
+
7
+ ### Added
8
+
9
+ - `Canonical::JSON.to_string(object)` for canonical JSON serialization (stable key ordering and numeric normalization), useful for deduplicating equivalent JSON Schemas.
10
+
11
+ ### Fixed
12
+
13
+ - Do not produce annotations for non-string instances from `contentMediaType`, `contentEncoding`, and `contentSchema` keywords.
14
+
5
15
  ## [0.43.0] - 2026-02-28
6
16
 
7
17
  ### Added
@@ -43,7 +53,8 @@
43
53
 
44
54
  - Initial public release
45
55
 
46
- [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.43.0...HEAD
56
+ [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.44.0...HEAD
57
+ [0.44.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.43.0...ruby-v0.44.0
47
58
  [0.43.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.42.2...ruby-v0.43.0
48
59
  [0.42.2]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.42.1...ruby-v0.42.2
49
60
  [0.42.1]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.42.0...ruby-v0.42.1
data/README.md CHANGED
@@ -251,6 +251,22 @@ valid_eval.annotations
251
251
  # instanceLocation: "", annotations: ["age", "name"]}]
252
252
  ```
253
253
 
254
+ ### Canonical JSON serialization
255
+
256
+ Use `Canonical::JSON.to_string` when you need a stable JSON representation:
257
+
258
+ ```ruby
259
+ schema_a = { "type" => "object", "properties" => { "b" => { "type" => "integer" }, "a" => { "type" => "string" } } }
260
+ schema_b = { "properties" => { "a" => { "type" => "string" }, "b" => { "type" => "integer" } }, "type" => "object" }
261
+
262
+ dump_a = JSONSchema::Canonical::JSON.to_string(schema_a)
263
+ dump_b = JSONSchema::Canonical::JSON.to_string(schema_b)
264
+
265
+ dump_a == dump_b # => true
266
+ ```
267
+
268
+ Main use case: deduplicating equivalent JSON Schemas.
269
+
254
270
  ## Meta-Schema Validation
255
271
 
256
272
  Validate that a JSON Schema document is itself valid:
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.43.0"
4
+ VERSION = "0.44.0"
5
5
  end
data/sig/jsonschema.rbs CHANGED
@@ -7,6 +7,15 @@ module JSONSchema
7
7
  # Valid draft version symbols
8
8
  type draft = :draft4 | :draft6 | :draft7 | :draft201909 | :draft202012
9
9
 
10
+ module Canonical
11
+ module JSON
12
+ # Serialize a Ruby value to canonical JSON.
13
+ #
14
+ # Main use case: deduplicate equivalent JSON Schemas by using a stable string form.
15
+ def self.to_string: (untyped object) -> String
16
+ end
17
+ end
18
+
10
19
  # Create a validator with auto-detected draft version.
11
20
  #
12
21
  # @param schema The JSON Schema (Hash or JSON string)
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.43.0
4
+ version: 0.44.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-02-28 00:00:00.000000000 Z
11
+ date: 2026-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal