-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #2021
- Loading branch information
Showing
6 changed files
with
101 additions
and
11 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
2 changes: 1 addition & 1 deletion
2
...ces/software/amazon/smithy/model/loader/invalid/traits/annotation-unclosed-object1.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Syntax error at line 4, column 8: Expected RPAREN(')') but found IDENTIFIER('MyString') | Model | ||
// Syntax error at line 4, column 8: Expected COLON(':') but found IDENTIFIER('MyString') | Model | ||
namespace com.foo | ||
@foo( | ||
string MyString |
2 changes: 1 addition & 1 deletion
2
...rces/software/amazon/smithy/model/loader/invalid/traits/invalid-trait-shape-id-key.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
53 changes: 53 additions & 0 deletions
53
...esources/software/amazon/smithy/model/loader/valid/traits/reference-shape-from-trait.json
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,53 @@ | ||
{ | ||
"smithy": "2.0", | ||
"shapes": { | ||
"smithy.example#StructA": { | ||
"type": "structure", | ||
"members": { | ||
"id": { | ||
"target": "smithy.api#String" | ||
} | ||
} | ||
}, | ||
"smithy.example#StructB": { | ||
"type": "structure", | ||
"members": { | ||
"structAId": { | ||
"target": "smithy.api#String", | ||
"traits": { | ||
"smithy.example#link": "smithy.example#StructA$id" | ||
} | ||
} | ||
} | ||
}, | ||
"smithy.example#StructC": { | ||
"type": "structure", | ||
"members": { | ||
"structAId": { | ||
"target": "smithy.api#String", | ||
"traits": { | ||
"smithy.example#link": "smithy.example#StructA$id" | ||
} | ||
} | ||
} | ||
}, | ||
"smithy.example#StructD": { | ||
"type": "structure", | ||
"members": { | ||
"structAId": { | ||
"target": "smithy.api#String", | ||
"traits": { | ||
"smithy.example#link": "smithy.example#StructA" | ||
} | ||
} | ||
} | ||
}, | ||
"smithy.example#link": { | ||
"type": "string", | ||
"traits": { | ||
"smithy.api#idRef": {}, | ||
"smithy.api#trait": {} | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...ources/software/amazon/smithy/model/loader/valid/traits/reference-shape-from-trait.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,26 @@ | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
@trait | ||
@idRef | ||
string link | ||
|
||
structure StructA { | ||
id: String | ||
} | ||
|
||
structure StructB { | ||
@link(StructA$id) | ||
structAId: String | ||
} | ||
|
||
structure StructC { | ||
@link(smithy.example#StructA$id) | ||
structAId: String | ||
} | ||
|
||
structure StructD { | ||
@link(smithy.example#StructA) | ||
structAId: String | ||
} |