jsonschema_rs 0.50.0 → 0.50.1

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: 8eab3d3f6e9ccf2a4ad5359fee53b8d6da2a5693b1e245bb1d1352a238988c5d
4
- data.tar.gz: 29f0ca7bcf0bf62631378ca5f97a8bd92e356001de903274fde4542f1e4c5387
3
+ metadata.gz: 7acba28bc0257f16171af9a56176f5278c09c28431fca51617d325cde3a6798f
4
+ data.tar.gz: 6c87343882695b9c1e1e5a1fdbc2a66cbabc33a5f0dee58a30b5d6dee1643210
5
5
  SHA512:
6
- metadata.gz: 5a42a2ae9ad830281bfaac0c896ac731b7627ee17388321b84e005f587d1734e289cc21f3794d85c7f0e477be1b8dbc79a401abc9369aaa85ab3eef1c687dee5
7
- data.tar.gz: 3c3ebba033ddd6e005d60ccec91cfab87c4f6e5b1e4752036d1b58eb8492070f0749fbed3c3c7f0187d5e21cdb1fe6ac7fe1782df9d6661d16f11e38a1fc0eec
6
+ metadata.gz: 6fb0b5f41da70c05b4ce56f721de089ee215485edc38160c9b0770ed70f66d7672d6db55c6a573def409079b06fa0c4e9e218adc2bfe750e946a9da6cace439d
7
+ data.tar.gz: d6614c068ca1f3f7eb8aede6a8b37321cad426f7b6158b7f870aab73fce44ceab7fa6afdef01617581571cce389281a206841ec1a34ad40e969b4b02759a0c23
data/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.50.1] - 2026-08-22
6
+
7
+ ### Changed
8
+
9
+ - `CanonicalSchema#satisfiability` answers `:yes` for a string whose `pattern` or `format` a matching value can be built from.
10
+ - `CanonicalSchema#satisfiability` answers `:no` where a `format` takes no string of the length the schema asks for.
11
+
12
+ ### Fixed
13
+
14
+ - `CanonicalSchema#negate` taking apart a union that reads a definition through its own `if`, so a schema and its negation shared a value.
15
+ - `CanonicalSchema#subtract` dropping a Draft 4 array member an element demand partly takes.
16
+ - `CanonicalSchema#covers` answering `Yes` where a Draft 4 element demand refuses a member.
17
+ - A string schema whose `maxLength` is `0` keeping a `pattern`, `format`, or content facet unread, so the same constraints written in one object and written as an `allOf` reached different canonical forms.
18
+
19
+ ### Performance
20
+
21
+ - `not` over a wide object schema costs its branch count instead of its square.
22
+ - `not` over an object schema is linear in its property count, not quadratic.
23
+ - `not` over an object schema with `additionalProperties: false` no longer costs cubic time in its property count.
24
+
5
25
  ## [0.50.0] - 2026-08-20
6
26
 
7
27
  ### Added
@@ -422,7 +442,8 @@
422
442
 
423
443
  - Initial public release
424
444
 
425
- [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.50.0...HEAD
445
+ [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.50.1...HEAD
446
+ [0.50.1]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.50.0...ruby-v0.50.1
426
447
  [0.50.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.9...ruby-v0.50.0
427
448
  [0.49.9]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.8...ruby-v0.49.9
428
449
  [0.49.8]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.7...ruby-v0.49.8
data/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "jsonschema-rb"
3
- version = "0.50.0"
3
+ version = "0.50.1"
4
4
  edition = "2021"
5
5
  authors = ["Dmitry Dygalo <dmitry@dygalo.dev>"]
6
6
  license = "MIT"
@@ -14,7 +14,7 @@ crate-type = ["cdylib"]
14
14
 
15
15
  [dependencies]
16
16
  strum = "0.28.0"
17
- jsonschema = { version = "0.50.0", default-features = false, features = ["magnus", "arbitrary-precision", "resolve-http", "resolve-file", "tls-ring", "macros"] }
17
+ jsonschema = { version = "0.50.1", default-features = false, features = ["magnus", "arbitrary-precision", "resolve-http", "resolve-file", "tls-ring", "macros"] }
18
18
  magnus = { version = "0.8", features = ["rb-sys"] }
19
19
  rb-sys = "0.9"
20
20
  serde = { workspace = true }
data/README.md CHANGED
@@ -365,6 +365,8 @@ Compare a request schema new-against-old and a response schema old-against-new:
365
365
 
366
366
  `:no` on the difference proves nothing was lost. `:unknown` proves nothing either way.
367
367
 
368
+ `:unknown` is undecided, not negative, so the two questions have opposite safe tests: only `satisfiability == :no` proves a schema admits nothing, and only `covers == :yes` proves containment.
369
+
368
370
  `JSONSchema::Canonical::Containment`, `Satisfiability`, `Distinctness` and `Kind` hold these symbols as constants, each with an `ALL` list.
369
371
 
370
372
  Both operands must share one setup - the same draft, format policy, regular-expression engine and definitions - or `IncompatibleOperands` is raised. `UnsupportedOperand` means an operand is a `Raw` pass-through, and `UnsupportedResult` that the canonical form does not support the result. All three live under `JSONSchema::Canonical`.
@@ -693,9 +693,9 @@ dependencies = [
693
693
 
694
694
  [[package]]
695
695
  name = "jsonschema"
696
- version = "0.50.0"
696
+ version = "0.50.1"
697
697
  source = "registry+https://github.com/rust-lang/crates.io-index"
698
- checksum = "7bd2225bc56c338f18465ce618e5e56fff1295fcb0a0cb338b28010193f26949"
698
+ checksum = "29b6bb4e22283b09119c671e57ac6a185e9a0c70c31585e56b729b626d877753"
699
699
  dependencies = [
700
700
  "ahash",
701
701
  "bytecount",
@@ -726,9 +726,9 @@ dependencies = [
726
726
 
727
727
  [[package]]
728
728
  name = "jsonschema-macros"
729
- version = "0.50.0"
729
+ version = "0.50.1"
730
730
  source = "registry+https://github.com/rust-lang/crates.io-index"
731
- checksum = "b98c87ae37713900b4c502fc934846e91ef7f0aded16b73c7b19e47efb257cec"
731
+ checksum = "000c297a4271d226040b519b13132ec685b0e5db6256e1dac53091c932232a81"
732
732
  dependencies = [
733
733
  "jsonschema-macros-core",
734
734
  "proc-macro2",
@@ -736,9 +736,9 @@ dependencies = [
736
736
 
737
737
  [[package]]
738
738
  name = "jsonschema-macros-core"
739
- version = "0.50.0"
739
+ version = "0.50.1"
740
740
  source = "registry+https://github.com/rust-lang/crates.io-index"
741
- checksum = "be61ad4d81d0e74cc842ad8f28af0ca2e3e2c15d06fa9a3d091ff29816b780c4"
741
+ checksum = "6d14c9603a90595803e9ad8a62487f8d19f31dcd3848e3b99cac44db21c1cada"
742
742
  dependencies = [
743
743
  "fancy-regex",
744
744
  "indexmap",
@@ -755,7 +755,7 @@ dependencies = [
755
755
 
756
756
  [[package]]
757
757
  name = "jsonschema-rb-ext"
758
- version = "0.50.0"
758
+ version = "0.50.1"
759
759
  dependencies = [
760
760
  "jsonschema",
761
761
  "magnus",
@@ -769,18 +769,18 @@ dependencies = [
769
769
 
770
770
  [[package]]
771
771
  name = "jsonschema-regex"
772
- version = "0.50.0"
772
+ version = "0.50.1"
773
773
  source = "registry+https://github.com/rust-lang/crates.io-index"
774
- checksum = "b11520e5257651f31068fa2c959ce28b09d8a217ffe42338bc27d690f06c0f8c"
774
+ checksum = "497fbf3b1ca53b1e23a253f636e88e7a2031387388b8140199a0f240fcadf647"
775
775
  dependencies = [
776
776
  "regex-syntax",
777
777
  ]
778
778
 
779
779
  [[package]]
780
780
  name = "jsonschema-value"
781
- version = "0.50.0"
781
+ version = "0.50.1"
782
782
  source = "registry+https://github.com/rust-lang/crates.io-index"
783
- checksum = "ccefde026ba6e6e23002c4e1e087b5f411ef5bc90f3e7febb7cf3c498ca8b169"
783
+ checksum = "b84ca3f39446973a810fc90fc2645ada8c24284f6deb009c78b776813973887d"
784
784
  dependencies = [
785
785
  "ahash",
786
786
  "bytecount",
@@ -1074,18 +1074,18 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
1074
1074
 
1075
1075
  [[package]]
1076
1076
  name = "rb-sys"
1077
- version = "0.9.126"
1077
+ version = "0.9.130"
1078
1078
  source = "registry+https://github.com/rust-lang/crates.io-index"
1079
- checksum = "284799e73e899fe946fd77c7211b83bff61a1356e039ade7a2516a779e3212d0"
1079
+ checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb"
1080
1080
  dependencies = [
1081
1081
  "rb-sys-build",
1082
1082
  ]
1083
1083
 
1084
1084
  [[package]]
1085
1085
  name = "rb-sys-build"
1086
- version = "0.9.126"
1086
+ version = "0.9.130"
1087
1087
  source = "registry+https://github.com/rust-lang/crates.io-index"
1088
- checksum = "855fc1ad8943d12c89ef12f9147f1cc531f5bf19fb744112fdd317bb6ee7b5c5"
1088
+ checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
1089
1089
  dependencies = [
1090
1090
  "bindgen",
1091
1091
  "lazy_static",
@@ -1133,9 +1133,9 @@ dependencies = [
1133
1133
 
1134
1134
  [[package]]
1135
1135
  name = "referencing"
1136
- version = "0.50.0"
1136
+ version = "0.50.1"
1137
1137
  source = "registry+https://github.com/rust-lang/crates.io-index"
1138
- checksum = "3b228fc6035ae00a9008ba156c0dfc98f0b6ebc5f3c8db7ac7006dcf8e56f15a"
1138
+ checksum = "7a0a32a2a2c2d7dd0ee54705b5fd641be73037271928f68e9b0e7205b71c9d30"
1139
1139
  dependencies = [
1140
1140
  "ahash",
1141
1141
  "fluent-uri",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "jsonschema-rb-ext"
3
- version = "0.50.0"
3
+ version = "0.50.1"
4
4
  edition = "2021"
5
5
  publish = false
6
6
 
@@ -10,10 +10,10 @@ name = "jsonschema_rb"
10
10
  path = "../../src/lib.rs"
11
11
 
12
12
  [dependencies]
13
- jsonschema = { version = "0.50.0", default-features = false, features = ["magnus", "arbitrary-precision", "resolve-http", "resolve-file", "tls-ring", "macros"] }
13
+ jsonschema = { version = "0.50.1", default-features = false, features = ["magnus", "arbitrary-precision", "resolve-http", "resolve-file", "tls-ring", "macros"] }
14
14
  magnus = { version = "0.8", features = ["rb-sys"] }
15
15
  rb-sys = "0.9"
16
- referencing = "0.50.0"
16
+ referencing = "0.50.1"
17
17
  serde = { version = "1", features = ["derive"] }
18
18
  serde_json = { version = "1", features = ["arbitrary_precision"] }
19
19
  strum = "0.28.0"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSONSchema
4
- VERSION = "0.50.0"
4
+ VERSION = "0.50.1"
5
5
  end
data/sig/jsonschema.rbs CHANGED
@@ -23,10 +23,12 @@ module JSONSchema
23
23
  # What an array requires of its elements: all distinct, some repeated, or neither.
24
24
  type distinctness = :unconstrained | :all_distinct | :some_repeated
25
25
 
26
- # Whether one schema admits every value another does.
26
+ # Whether one schema admits every value another does. Only `:yes` proves containment: test
27
+ # for `:yes`, and treat `:unknown` like `:no`.
27
28
  type containment = :yes | :no | :unknown
28
29
 
29
- # Whether any value satisfies a schema.
30
+ # Whether any value satisfies a schema. Only `:no` proves it admits nothing: test for `:no`,
31
+ # and treat `:unknown` like `:yes`.
30
32
  type satisfiability = :yes | :no | :unknown
31
33
 
32
34
  type view = TrueView | FalseView | MultiTypeView | TypedGroupView | StringView
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonschema_rs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.50.0
4
+ version: 0.50.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dygalo
@@ -35,14 +35,14 @@ dependencies:
35
35
  requirements:
36
36
  - - "~>"
37
37
  - !ruby/object:Gem::Version
38
- version: 0.9.124
38
+ version: 0.9.130
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - "~>"
44
44
  - !ruby/object:Gem::Version
45
- version: 0.9.124
45
+ version: 0.9.130
46
46
  description: High-performance JSON Schema validator with support for Draft 4, 6, 7,
47
47
  2019-09, and 2020-12.
48
48
  email: