jsonschema_rs 0.50.0-aarch64-linux → 0.51.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: 25eabdf997035d336701b550d29389ed1f9b894beb03d77fc45a0b10ccb4d29c
4
- data.tar.gz: d62cff75ffb98e41ce3977d518c2427f38b3625925b76c036b46c0f45b75de8e
3
+ metadata.gz: d3ea11fcbe7ce2ef575e6fd4b3f1dc3723e01127568d6b4be6f80408f2a6a4e1
4
+ data.tar.gz: f9ed0cffd63aa0e7f7c3aa0e99dbe83c037b75bbc2e6f58be8da91e8bd35ab67
5
5
  SHA512:
6
- metadata.gz: 46b9f8e8fc9a227c31299f26f3542ca5885ec1f680956d723cbe6978fd4b280a87a24e9b0a277e103ba6290a1fe2392a28e7387f590e7801f254f3de9f0d37f2
7
- data.tar.gz: fe336068954a246f515ea3adf1f9c269891fabeed2e286a7109df28f80d7ae2d100bebfa80cd62bb66251d472a800d87805dcec7d0fe95e440e988d55bf427d2
6
+ metadata.gz: aec7847d3f6aa956da4e2d6552275e791d7d0be89c4f1f89bc34353a4e444f9790d6db300e03c4f8506c894e3b76454e0b787ef87a8d8b9a80be9ab037d2be91
7
+ data.tar.gz: 97772ef25ab0982975468bb7d2df115126a670c44313bfef2f569a9e2b4d4dadc80999c4f6afa322b5d03a2bce1e4a64725b6e809b7fce0cfc7cde1001c7213e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.51.0] - 2026-08-23
6
+
7
+ ### Added
8
+
9
+ - `vocabularies` option, declaring support for a vocabulary this library does not implement.
10
+
11
+ ### Fixed
12
+
13
+ - The `uniqueItems` length ceiling not reading an `items` or `contains` schema written as a `$ref`.
14
+ - The Draft 2020-12 Format-Assertion vocabulary read as an annotation, so a meta-schema requiring it accepted values its `format` rejects.
15
+ - An unrecognized `format` accepted under a meta-schema requiring the Format-Assertion vocabulary (it should be rejected).
16
+ - A meta-schema requiring a vocabulary this library does not implement accepted (it should be rejected).
17
+ - The Draft 2019-09 Format vocabulary declared `true` read as an annotation, so a meta-schema requiring it accepted values its `format` rejects.
18
+ - The bundled `https://json-schema.org/draft/2020-12/meta/format-assertion` meta-schema not declaring its vocabulary, so a schema written against it annotated `format` instead of asserting it.
19
+ - A meta-schema without `$id` keeping its `$vocabulary` unread, so a schema written against it got every Draft 2020-12 vocabulary.
20
+ - A schema naming a bundled vocabulary meta-schema as its `$schema` rejected as an unknown meta-schema (it should build).
21
+ - The `regex` format reading the Rust regex dialect (it should read the ECMA-262 dialect in Unicode mode).
22
+ - The `uri-template` format rejecting an apostrophe in a literal (it should accept it, per RFC 6570 errata 6937).
23
+ - The `duration` format accepting weeks combined with a time part, such as `P1WT1H` (it should reject it).
24
+ - Stack overflow compiling `unevaluatedProperties` or `unevaluatedItems` beside a `$ref` that cycles back to the node, written as `#`, through its `$id`, or through a chain of definitions.
25
+
26
+ ### Performance
27
+
28
+ - Building `unevaluatedProperties` or `unevaluatedItems` over a deep `allOf` or `$ref` chain costs its depth instead of its square.
29
+
30
+ ## [0.50.1] - 2026-08-22
31
+
32
+ ### Changed
33
+
34
+ - `CanonicalSchema#satisfiability` answers `:yes` for a string whose `pattern` or `format` a matching value can be built from.
35
+ - `CanonicalSchema#satisfiability` answers `:no` where a `format` takes no string of the length the schema asks for.
36
+
37
+ ### Fixed
38
+
39
+ - `CanonicalSchema#negate` taking apart a union that reads a definition through its own `if`, so a schema and its negation shared a value.
40
+ - `CanonicalSchema#subtract` dropping a Draft 4 array member an element demand partly takes.
41
+ - `CanonicalSchema#covers` answering `Yes` where a Draft 4 element demand refuses a member.
42
+ - 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.
43
+
44
+ ### Performance
45
+
46
+ - `not` over a wide object schema costs its branch count instead of its square.
47
+ - `not` over an object schema is linear in its property count, not quadratic.
48
+ - `not` over an object schema with `additionalProperties: false` no longer costs cubic time in its property count.
49
+
5
50
  ## [0.50.0] - 2026-08-20
6
51
 
7
52
  ### Added
@@ -422,7 +467,9 @@
422
467
 
423
468
  - Initial public release
424
469
 
425
- [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.50.0...HEAD
470
+ [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.51.0...HEAD
471
+ [0.51.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.50.1...ruby-v0.51.0
472
+ [0.50.1]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.50.0...ruby-v0.50.1
426
473
  [0.50.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.9...ruby-v0.50.0
427
474
  [0.49.9]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.8...ruby-v0.49.9
428
475
  [0.49.8]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.49.7...ruby-v0.49.8
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`.
@@ -642,6 +644,7 @@ JSONSchema.valid?(schema, instance,
642
644
  formats: { "name" => proc }, # Custom format validators
643
645
  keywords: { "name" => Klass }, # Custom keyword validators
644
646
  registry: registry, # Pre-registered schemas
647
+ vocabularies: ["https://..."], # Vocabularies implemented by custom keywords
645
648
  pattern_options: opts, # RegexOptions or FancyRegexOptions
646
649
  email_options: opts, # EmailOptions
647
650
  http_options: opts # HttpOptions
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.50.0"
4
+ VERSION = "0.51.0"
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
@@ -308,6 +310,7 @@ module JSONSchema
308
310
  untyped schema,
309
311
  ?validate_formats: bool?,
310
312
  ?ignore_unknown_formats: bool?,
313
+ ?vocabularies: Array[String]?,
311
314
  ?base_uri: String?,
312
315
  ?retriever: (^(String) -> untyped)?,
313
316
  ?mask: String?,
@@ -324,6 +327,7 @@ module JSONSchema
324
327
  untyped schema,
325
328
  ?validate_formats: bool?,
326
329
  ?ignore_unknown_formats: bool?,
330
+ ?vocabularies: Array[String]?,
327
331
  ?mask: ::String?,
328
332
  ?base_uri: ::String?,
329
333
  ?retriever: (^(::String) -> untyped)?,
@@ -369,6 +373,7 @@ module JSONSchema
369
373
  ?draft: draft?,
370
374
  ?validate_formats: bool?,
371
375
  ?ignore_unknown_formats: bool?,
376
+ ?vocabularies: Array[String]?,
372
377
  ?base_uri: String?,
373
378
  ?retriever: (^(String) -> untyped)?,
374
379
  ?mask: String?,
@@ -387,6 +392,7 @@ module JSONSchema
387
392
  ?draft: draft?,
388
393
  ?validate_formats: bool?,
389
394
  ?ignore_unknown_formats: bool?,
395
+ ?vocabularies: Array[String]?,
390
396
  ?base_uri: String?,
391
397
  ?retriever: (^(String) -> untyped)?,
392
398
  ?mask: String?,
@@ -405,6 +411,7 @@ module JSONSchema
405
411
  ?draft: draft?,
406
412
  ?validate_formats: bool?,
407
413
  ?ignore_unknown_formats: bool?,
414
+ ?vocabularies: Array[String]?,
408
415
  ?base_uri: String?,
409
416
  ?retriever: (^(String) -> untyped)?,
410
417
  ?mask: String?,
@@ -421,6 +428,7 @@ module JSONSchema
421
428
  ?draft: draft?,
422
429
  ?validate_formats: bool?,
423
430
  ?ignore_unknown_formats: bool?,
431
+ ?vocabularies: Array[String]?,
424
432
  ?base_uri: String?,
425
433
  ?retriever: (^(String) -> untyped)?,
426
434
  ?mask: String?,
@@ -439,6 +447,7 @@ module JSONSchema
439
447
  ?draft: draft?,
440
448
  ?validate_formats: bool?,
441
449
  ?ignore_unknown_formats: bool?,
450
+ ?vocabularies: Array[String]?,
442
451
  ?base_uri: String?,
443
452
  ?retriever: (^(String) -> untyped)?,
444
453
  ?formats: Hash[String, ^(String) -> bool]?,
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.50.0
4
+ version: 0.51.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-08-20 00:00:00.000000000 Z
11
+ date: 2026-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal