jsonschema_rs 0.63.0-x86_64-linux → 0.63.1-x86_64-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: 1825db9327a8b87ba8f8f3b1a65ac219859e642390e2a8b38f20ee2bb5ce5804
4
- data.tar.gz: 3f3a9d7f0999e1ea07a76bad0b41a744427a7d6b1ecc8166b70a38bd67ab2c27
3
+ metadata.gz: '0965a55fc2dc1e92729923e3dafa5593e46fd7e6f99563b944d9f9181d5d5a80'
4
+ data.tar.gz: b83163c689996d54f25f35fe65264e30f83eddcd4b1d8a34ea81aa1c4f96750c
5
5
  SHA512:
6
- metadata.gz: b9412ddaacac54d282e409cd28bcbdc9f6abe8a53802d8bc5407cc074b5239356e3ca4f22f9e768dc5907ace068fd66dc0b3683c60f8b6a0c0992d7da4de9da6
7
- data.tar.gz: c60b43d1e4ad011a2220ce1e7752beccc1ecc2026801296ae02800ad2468c9889512926fd3dac8ffbe151913e2acd7f562ad85db87d9bf5ac5ed123546e968ad
6
+ metadata.gz: 89800a0d6752b97639b13ceb6daa4c755854ed063313e239aa1b5937f4d784e66a46cad32b5046ed2be44646bb522f51911e0dc553127babe270e1fef6bc0667
7
+ data.tar.gz: 2fe5984e66e770d702e2b5138608816ba883588bdd85186bebd0714683cf32ce3f3ec1c228d352174aff35b2587200f34e2fddff9faaa6cadfceb440dca43461
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.63.1] - 2026-11-23
6
+
7
+ ### Added
8
+
9
+ - `JSONSchema.known_formats`, the names of the formats with a check under a draft, built in and registered.
10
+
5
11
  ## [0.63.0] - 2026-11-22
6
12
 
7
13
  ### Added
@@ -873,7 +879,8 @@
873
879
 
874
880
  - Initial public release
875
881
 
876
- [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.63.0...HEAD
882
+ [Unreleased]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.63.1...HEAD
883
+ [0.63.1]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.63.0...ruby-v0.63.1
877
884
  [0.63.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.62.0...ruby-v0.63.0
878
885
  [0.62.0]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.61.2...ruby-v0.62.0
879
886
  [0.61.2]: https://github.com/Stranger6667/jsonschema/compare/ruby-v0.61.1...ruby-v0.61.2
data/README.md CHANGED
@@ -157,6 +157,12 @@ validator = JSONSchema.validator_for({ "format" => "int32" }, validate_formats:
157
157
  validator.valid?(2**31) # => false
158
158
  ```
159
159
 
160
+ `JSONSchema.known_formats` lists the formats with a check under a draft, built in and from `formats`:
161
+
162
+ ```ruby
163
+ JSONSchema.known_formats(:draft202012, formats: { "phone" => phone_format }).include?("phone") # => true
164
+ ```
165
+
160
166
  ### Custom keyword validators
161
167
 
162
168
  ```ruby
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.63.0"
4
+ VERSION = "0.63.1"
5
5
  end
data/sig/jsonschema.rbs CHANGED
@@ -380,6 +380,10 @@ module JSONSchema
380
380
  class NumberFormat
381
381
  end
382
382
 
383
+ # The names of the formats with a check under `draft`, sorted and without duplicates: the
384
+ # built-in formats and those in `formats`.
385
+ def self.known_formats: (draft draft, ?formats: Hash[String, (^(String) -> bool) | NumberFormat]?) -> Array[String]
386
+
383
387
  # Create a validator with auto-detected draft version.
384
388
  def self.validator_for: (
385
389
  untyped schema,
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.63.0
4
+ version: 0.63.1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Dmitry Dygalo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-22 00:00:00.000000000 Z
11
+ date: 2026-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal
@@ -56,7 +56,7 @@ metadata:
56
56
  homepage_uri: https://github.com/Stranger6667/jsonschema/tree/master/crates/jsonschema-rb
57
57
  source_code_uri: https://github.com/Stranger6667/jsonschema
58
58
  changelog_uri: https://github.com/Stranger6667/jsonschema/blob/master/crates/jsonschema-rb/CHANGELOG.md
59
- documentation_uri: https://github.com/Stranger6667/jsonschema/blob/ruby-v0.63.0/crates/jsonschema-rb/README.md
59
+ documentation_uri: https://github.com/Stranger6667/jsonschema/blob/ruby-v0.63.1/crates/jsonschema-rb/README.md
60
60
  bug_tracker_uri: https://github.com/Stranger6667/jsonschema/issues
61
61
  funding_uri: https://github.com/sponsors/Stranger6667
62
62
  rubygems_mfa_required: 'true'