Skip to content

include input values in snapshot for a smooth review #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ thiserror = "1.0.40"
build-binary = ["clap", "anyhow"]

[dev-dependencies]
insta = { version = "1.29.0", features = ["glob"] }
insta = { version = "1.29.0", features = ["glob", "serde"] }
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
additionalProperties: false
rhs:
additionalProperties: true
input_file: tests/fixtures/additional_properties/extend.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
additionalProperties: true
rhs:
additionalProperties: false
input_file: tests/fixtures/additional_properties/restrict.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
anyOf:
- minimum: 1
type: integer
rhs:
type:
- integer
- string
input_file: tests/fixtures/any_of/any_of_with_constraint_to_type_1.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
anyOf:
- minimum: 1
type: integer
- minimum: 2
type: integer
rhs:
minimum: 1
type:
- integer
- string
input_file: tests/fixtures/any_of/any_of_with_constraint_to_type_2.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
anyOf:
- type: array
- type: string
rhs:
anyOf:
- type: string
- type: array
input_file: tests/fixtures/any_of/order_change.json
---
[]
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
anyOf:
- type: string
rhs:
type: string
input_file: tests/fixtures/any_of/to_equivalent_type.json
---
[]
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
anyOf:
- type: integer
rhs:
type:
- integer
- string
input_file: tests/fixtures/any_of/to_less_strict_type.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
anyOf:
- type: integer
- type: string
rhs:
type: string
input_file: tests/fixtures/any_of/to_more_strict_type.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
definitions:
Hello:
type: number
items:
- const: start_unmerge
- $ref: "#/definitions/Hello"
type: array
rhs:
definitions:
Hello:
anyOf:
- minimum: 1
type: number
items:
- const: start_unmerge
- $ref: "#/definitions/Hello"
type: array
input_file: tests/fixtures/any_of/type_to_any_of_within_array.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
type: integer
rhs:
anyOf:
- type: integer
input_file: tests/fixtures/any_of/type_to_equivalent_any_of.json
---
[]
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
minimum: 1
type: integer
rhs:
anyOf:
- type: integer
input_file: tests/fixtures/any_of/type_to_less_strict_any_of.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
type: integer
rhs:
anyOf:
- type: integer
- type: string
input_file: tests/fixtures/any_of/type_to_more_strict_any_of.json
---
[
Expand Down
13 changes: 13 additions & 0 deletions tests/snapshots/test__from_fixtures@properties__add.json.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
properties:
hello:
type: string
type: object
rhs:
properties:
hello:
type: string
world:
type: string
type: object
input_file: tests/fixtures/properties/add.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
definitions:
Hello:
type: object
items:
- const: start_unmerge
- $ref: "#/definitions/Hello"
type: array
rhs:
definitions:
Hello:
properties:
transaction_id:
type: string
type: object
items:
- const: start_unmerge
- $ref: "#/definitions/Hello"
type: array
input_file: tests/fixtures/properties/add_property_in_array.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
anyOf:
- items:
- const: start_unmerge
- type: object
type: array
rhs:
anyOf:
- items:
- const: start_unmerge
- properties:
transaction_id:
type: string
type: object
type: array
input_file: tests/fixtures/properties/add_property_in_array_of_any_of.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
properties:
hello:
type: string
type: object
rhs:
properties:
hello:
type: number
type: object
input_file: tests/fixtures/properties/change.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
properties:
hello:
type: string
world:
type: string
type: object
rhs:
properties:
hello:
type: string
type: object
input_file: tests/fixtures/properties/remove.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
additionalProperties: true
properties:
foobar:
type: string
type: object
rhs:
additionalProperties: true
type: object
input_file: tests/fixtures/properties/remove_property_while_allowing_additional_properties.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
type: number
rhs:
maximum: 1
type: number
input_file: tests/fixtures/range/add_maximum.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
type: number
rhs:
minimum: 1
type: number
input_file: tests/fixtures/range/add_minimum.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
definitions:
Hello:
type: number
items:
- const: start_unmerge
- $ref: "#/definitions/Hello"
type: array
rhs:
definitions:
Hello:
minimum: 1
type: number
items:
- const: start_unmerge
- $ref: "#/definitions/Hello"
type: array
input_file: tests/fixtures/range/add_minimum_in_array.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
minimum: 1
type: number
rhs:
minimum: 1.3
type: number
input_file: tests/fixtures/range/change_minimum.json
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
source: tests/test.rs
expression: diff
info:
lhs:
maximum: 2
minimum: 1
type: number
rhs:
maximum: 2.5
minimum: 1.5
type: number
input_file: tests/fixtures/range/change_minimum_and_maximum.json
---
[
Expand Down
Loading