schemurai 2.2.0 → 2.2.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: 01b0c89354b90232337525b7fe75c063053fecd2965036bb7ff600d2b4e823cb
4
- data.tar.gz: f45549ac8cf41eae0c2b28220ca93fe87042cec2aa7c7926382a00f8f65c105d
3
+ metadata.gz: ad9362bcb75b8b6f51fb74a2d15858766793620d348fc4924746c44eaa210fc3
4
+ data.tar.gz: ba30c2b4f45525b6953019dda82a3f4b1cbcc41405925e19c2f4550b58dfccd1
5
5
  SHA512:
6
- metadata.gz: 618d494971d7a1745075dae9b9e6155562f9c0f0fb058e923cd457f26bb062be2858db9f2ffaf711d035ee83490179e005869106f3ae29ef0c8011512bed2af9
7
- data.tar.gz: 6ecd49a7320b6b936067808a2a0bd07d6e497418427d0e1612d624dd703a71c6eae99f9ae27ab0a94c2946c3a6495fdc2c11bf665b7d59a9fad628f285af0f5e
6
+ metadata.gz: 1773b839b4b8de56dc0f0087e1070f6236602f3ad9a5aec39bcebe2586c5632a45865a6326365bba505f49728d006e1c9c6dbe63f9f1075d00a3398241d953d0
7
+ data.tar.gz: bfd5d96cd648547bfc1a97bd7d0f566ba5d86a4f39e8ceb89a27ebc536ce45ac8563614024a2d10c73cb6c61dd568a0f271069a7525510d6bd214de52ba53a3c
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Schemurai
4
4
  # The installed Schemurai version.
5
- VERSION = "2.2.0"
5
+ VERSION = "2.2.1"
6
6
  end
data/sig/schemurai.rbs CHANGED
@@ -1,13 +1,6 @@
1
1
  module Schemurai
2
2
  # A JSON-shaped Ruby value accepted as a schema value or validation instance.
3
- type json_value =
4
- nil
5
- | bool
6
- | Integer
7
- | Float
8
- | String
9
- | Array[json_value]
10
- | Hash[String, json_value]
3
+ type json_value = nil | bool | Integer | Float | String | Array[json_value] | Hash[String, json_value]
11
4
 
12
5
  # A JSON Schema root.
13
6
  type schema = bool | Hash[String, json_value]
@@ -50,12 +43,7 @@ module Schemurai
50
43
  def self.[]: (String keyword, String instance_path, String schema_path, String message) -> ValidationError
51
44
  | (keyword: String, instance_path: String, schema_path: String, message: String) -> ValidationError
52
45
 
53
- def to_h: () -> {
54
- keyword: String,
55
- instance_path: String,
56
- schema_path: String,
57
- message: String
58
- }
46
+ def to_h: () -> { keyword: String, instance_path: String, schema_path: String, message: String }
59
47
  end
60
48
 
61
49
  class Result
@@ -68,7 +56,9 @@ module Schemurai
68
56
 
69
57
  interface _Evaluator
70
58
  def backend: () -> backend
59
+
71
60
  def validate: (json_value instance) -> Result
61
+
72
62
  def valid?: (json_value instance) -> bool
73
63
  end
74
64
 
@@ -82,76 +72,29 @@ module Schemurai
82
72
  class SchemaRegistry
83
73
  attr_reader backend: backend
84
74
 
85
- def initialize: (
86
- ?schemas: schemas,
87
- ?validate_schema: bool,
88
- ?backend: backend_selection
89
- ) -> void
75
+ def initialize: (?schemas: schemas, ?validate_schema: bool, ?backend: backend_selection) -> void
90
76
 
91
77
  def validate_schema?: () -> bool
92
78
 
93
- def compile: (
94
- schema schema,
95
- ?base_uri: String?,
96
- ?content: bool,
97
- ?format: bool
98
- ) -> Validator
79
+ def compile: (schema schema, ?base_uri: String?, ?content: bool, ?format: bool) -> Validator
99
80
 
100
81
  def validate_schema: (schema schema) -> Result
101
82
  def valid_schema?: (schema schema) -> bool
102
83
  def make_shareable: () -> self
103
84
  def shareable?: () -> bool
104
85
 
105
- def validator_for: (
106
- String uri,
107
- ?content: bool,
108
- ?format: bool
109
- ) -> Validator
86
+ def validator_for: (String uri, ?content: bool, ?format: bool) -> Validator
110
87
  end
111
88
 
112
89
  def self.backend: () -> backend
113
90
 
114
- def self.compile: (
115
- schema schema,
116
- ?schemas: schemas,
117
- ?base_uri: String?,
118
- ?content: bool,
119
- ?format: bool,
120
- ?validate_schema: bool,
121
- ?backend: backend_selection
122
- ) -> Validator
123
-
124
- def self.validate_schema: (
125
- schema schema,
126
- ?schemas: schemas,
127
- ?backend: backend_selection
128
- ) -> Result
129
-
130
- def self.valid_schema?: (
131
- schema schema,
132
- ?schemas: schemas,
133
- ?backend: backend_selection
134
- ) -> bool
135
-
136
- def self.validate: (
137
- schema schema,
138
- json_value instance,
139
- ?schemas: schemas,
140
- ?base_uri: String?,
141
- ?content: bool,
142
- ?format: bool,
143
- ?validate_schema: bool,
144
- ?backend: backend_selection
145
- ) -> Result
146
-
147
- def self.valid?: (
148
- schema schema,
149
- json_value instance,
150
- ?schemas: schemas,
151
- ?base_uri: String?,
152
- ?content: bool,
153
- ?format: bool,
154
- ?validate_schema: bool,
155
- ?backend: backend_selection
156
- ) -> bool
91
+ def self.compile: (schema schema, ?schemas: schemas, ?base_uri: String?, ?content: bool, ?format: bool, ?validate_schema: bool, ?backend: backend_selection) -> Validator
92
+
93
+ def self.validate_schema: (schema schema, ?schemas: schemas, ?backend: backend_selection) -> Result
94
+
95
+ def self.valid_schema?: (schema schema, ?schemas: schemas, ?backend: backend_selection) -> bool
96
+
97
+ def self.validate: (schema schema, json_value instance, ?schemas: schemas, ?base_uri: String?, ?content: bool, ?format: bool, ?validate_schema: bool, ?backend: backend_selection) -> Result
98
+
99
+ def self.valid?: (schema schema, json_value instance, ?schemas: schemas, ?base_uri: String?, ?content: bool, ?format: bool, ?validate_schema: bool, ?backend: backend_selection) -> bool
157
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schemurai
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuya KOHARA (oakcask)
@@ -63,7 +63,7 @@ licenses:
63
63
  metadata:
64
64
  homepage_uri: https://github.com/oakcask/schemurai
65
65
  source_code_uri: https://github.com/oakcask/schemurai/tree/main
66
- documentation_uri: https://rubydoc.info/gems/schemurai/2.2.0
66
+ documentation_uri: https://rubydoc.info/gems/schemurai/2.2.1
67
67
  rubygems_mfa_required: 'true'
68
68
  rdoc_options:
69
69
  - "--main"