Skip to content

Commit 5d27055

Browse files
authored
include input values in snapshot for a smooth review (#28)
1 parent c05abde commit 5d27055

File tree

40 files changed

+322
-19
lines changed

40 files changed

+322
-19
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ thiserror = "1.0.40"
3030
build-binary = ["clap", "anyhow"]
3131

3232
[dev-dependencies]
33-
insta = { version = "1.29.0", features = ["glob"] }
33+
insta = { version = "1.29.0", features = ["glob", "serde"] }

tests/snapshots/test__from_fixtures@additional_properties__extend.json.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
additionalProperties: false
7+
rhs:
8+
additionalProperties: true
49
input_file: tests/fixtures/additional_properties/extend.json
510
---
611
[

tests/snapshots/test__from_fixtures@additional_properties__restrict.json.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
additionalProperties: true
7+
rhs:
8+
additionalProperties: false
49
input_file: tests/fixtures/additional_properties/restrict.json
510
---
611
[

tests/snapshots/test__from_fixtures@any_of__any_of_with_constraint_to_type_1.json.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
anyOf:
7+
- minimum: 1
8+
type: integer
9+
rhs:
10+
type:
11+
- integer
12+
- string
413
input_file: tests/fixtures/any_of/any_of_with_constraint_to_type_1.json
514
---
615
[

tests/snapshots/test__from_fixtures@any_of__any_of_with_constraint_to_type_2.json.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
anyOf:
7+
- minimum: 1
8+
type: integer
9+
- minimum: 2
10+
type: integer
11+
rhs:
12+
minimum: 1
13+
type:
14+
- integer
15+
- string
416
input_file: tests/fixtures/any_of/any_of_with_constraint_to_type_2.json
517
---
618
[
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
anyOf:
7+
- type: array
8+
- type: string
9+
rhs:
10+
anyOf:
11+
- type: string
12+
- type: array
413
input_file: tests/fixtures/any_of/order_change.json
514
---
615
[]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
anyOf:
7+
- type: string
8+
rhs:
9+
type: string
410
input_file: tests/fixtures/any_of/to_equivalent_type.json
511
---
612
[]

tests/snapshots/test__from_fixtures@any_of__to_less_strict_type.json.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
anyOf:
7+
- type: integer
8+
rhs:
9+
type:
10+
- integer
11+
- string
412
input_file: tests/fixtures/any_of/to_less_strict_type.json
513
---
614
[

tests/snapshots/test__from_fixtures@any_of__to_more_strict_type.json.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
anyOf:
7+
- type: integer
8+
- type: string
9+
rhs:
10+
type: string
411
input_file: tests/fixtures/any_of/to_more_strict_type.json
512
---
613
[

tests/snapshots/test__from_fixtures@any_of__type_to_any_of_within_array.json.snap

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
---
22
source: tests/test.rs
33
expression: diff
4+
info:
5+
lhs:
6+
definitions:
7+
Hello:
8+
type: number
9+
items:
10+
- const: start_unmerge
11+
- $ref: "#/definitions/Hello"
12+
type: array
13+
rhs:
14+
definitions:
15+
Hello:
16+
anyOf:
17+
- minimum: 1
18+
type: number
19+
items:
20+
- const: start_unmerge
21+
- $ref: "#/definitions/Hello"
22+
type: array
423
input_file: tests/fixtures/any_of/type_to_any_of_within_array.json
524
---
625
[

0 commit comments

Comments
 (0)