This repository was archived by the owner on Nov 30, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +12
-10
lines changed Expand file tree Collapse file tree 10 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ schemars = { version = "0.8.0", optional = true }
27
27
[dev-dependencies ]
28
28
serde_test = " 1.0"
29
29
serde_json = " 1.0"
30
- jsonschema-valid = " 0.4.0"
30
+
31
+ [dev-dependencies .jsonschema-valid-compat ]
32
+ version = " 0.4.1-alpha.1"
31
33
32
34
[target .wasm32-unknown-unknown .dev-dependencies ]
33
35
wasm-bindgen-test = " 0.3"
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ mod tests {
183
183
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
184
184
let s = schemars:: schema_for! ( hash160:: Hash ) ;
185
185
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
186
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
186
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
187
187
}
188
188
}
189
189
Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ mod tests {
406
406
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
407
407
let s = schemars:: schema_for! ( Hmac :: <sha512:: Hash >) ;
408
408
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
409
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
409
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
410
410
}
411
411
}
412
412
Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ mod tests {
563
563
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
564
564
let s = schemars:: schema_for! ( ripemd160:: Hash ) ;
565
565
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
566
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
566
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
567
567
}
568
568
}
569
569
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ mod tests {
288
288
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
289
289
let s = schemars:: schema_for! ( sha1:: Hash ) ;
290
290
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
291
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
291
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
292
292
}
293
293
}
294
294
Original file line number Diff line number Diff line change @@ -524,7 +524,7 @@ mod tests {
524
524
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
525
525
let s = schemars:: schema_for! ( sha256:: Hash ) ;
526
526
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
527
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
527
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
528
528
}
529
529
530
530
#[ cfg( target_arch = "wasm32" ) ]
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ input: &'static str,
166
166
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
167
167
let s = schemars:: schema_for! ( sha256d:: Hash ) ;
168
168
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
169
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
169
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
170
170
}
171
171
172
172
}
Original file line number Diff line number Diff line change @@ -286,6 +286,6 @@ mod tests {
286
286
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
287
287
let s = schemars:: schema_for! ( TestHash ) ;
288
288
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
289
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
289
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
290
290
}
291
291
}
Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ mod tests {
460
460
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
461
461
let s = schemars:: schema_for! ( sha512:: Hash ) ;
462
462
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
463
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
463
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
464
464
}
465
465
}
466
466
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ mod tests {
426
426
let js = serde_json:: from_str ( & serde_json:: to_string ( & hash) . unwrap ( ) ) . unwrap ( ) ;
427
427
let s = schemars:: schema_for! ( Hash ) ;
428
428
let schema = serde_json:: from_str ( & serde_json:: to_string ( & s) . unwrap ( ) ) . unwrap ( ) ;
429
- assert ! ( jsonschema_valid :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
429
+ assert ! ( jsonschema_valid_compat :: Config :: from_schema( & schema, None ) . unwrap( ) . validate( & js) . is_ok( ) ) ;
430
430
}
431
431
}
432
432
You can’t perform that action at this time.
0 commit comments