-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve member target diff checks for maps
This commit updates the ChangedMemberTarget diff evaluator to properly check changes to map keys and values the same way it checks changes to list members.
- Loading branch information
Showing
12 changed files
with
300 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...tware/amazon/smithy/diff/evaluators/changed-member-target-invalid-nested-mapkey1-a.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B1 | ||
} | ||
|
||
map B1 { | ||
key: MyString | ||
value: MyString | ||
} | ||
|
||
string MyString |
17 changes: 17 additions & 0 deletions
17
...tware/amazon/smithy/diff/evaluators/changed-member-target-invalid-nested-mapkey1-b.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B2 | ||
} | ||
|
||
map B2 { | ||
@pattern("^[a-z]+$") | ||
key: MyString | ||
|
||
value: MyString | ||
} | ||
|
||
string MyString |
15 changes: 15 additions & 0 deletions
15
...tware/amazon/smithy/diff/evaluators/changed-member-target-invalid-nested-mapkey2-a.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B1 | ||
} | ||
|
||
map B1 { | ||
key: MyString | ||
value: MyString | ||
} | ||
|
||
string MyString |
17 changes: 17 additions & 0 deletions
17
...tware/amazon/smithy/diff/evaluators/changed-member-target-invalid-nested-mapkey2-b.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B2 | ||
} | ||
|
||
map B2 { | ||
key: MyString2 | ||
value: MyString | ||
} | ||
|
||
string MyString | ||
|
||
string MyString2 |
15 changes: 15 additions & 0 deletions
15
...are/amazon/smithy/diff/evaluators/changed-member-target-invalid-nested-mapvalue1-a.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B1 | ||
} | ||
|
||
map B1 { | ||
key: MyString | ||
value: MyString | ||
} | ||
|
||
string MyString |
17 changes: 17 additions & 0 deletions
17
...are/amazon/smithy/diff/evaluators/changed-member-target-invalid-nested-mapvalue1-b.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B2 | ||
} | ||
|
||
map B2 { | ||
key: MyString | ||
|
||
@pattern("^[a-z]+$") | ||
value: MyString | ||
} | ||
|
||
string MyString |
15 changes: 15 additions & 0 deletions
15
...are/amazon/smithy/diff/evaluators/changed-member-target-invalid-nested-mapvalue2-a.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B1 | ||
} | ||
|
||
map B1 { | ||
key: MyString | ||
value: MyString | ||
} | ||
|
||
string MyString |
17 changes: 17 additions & 0 deletions
17
...are/amazon/smithy/diff/evaluators/changed-member-target-invalid-nested-mapvalue2-b.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B2 | ||
} | ||
|
||
map B2 { | ||
key: MyString | ||
value: MyString2 | ||
} | ||
|
||
string MyString | ||
|
||
string MyString2 |
15 changes: 15 additions & 0 deletions
15
...urces/software/amazon/smithy/diff/evaluators/changed-member-target-valid-nested2-a.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B1 | ||
} | ||
|
||
map B1 { | ||
key: MyString | ||
value: MyString | ||
} | ||
|
||
string MyString |
15 changes: 15 additions & 0 deletions
15
...urces/software/amazon/smithy/diff/evaluators/changed-member-target-valid-nested2-b.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// See ChangedMemberTargetTest | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
structure A { | ||
member: B2 | ||
} | ||
|
||
map B2 { | ||
key: MyString | ||
value: MyString | ||
} | ||
|
||
string MyString |