-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle lists, maps, and unions with flattening
- Loading branch information
Showing
10 changed files
with
234 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"smithy": "2.0", | ||
"shapes": { | ||
"smithy.ruby.tests#MyList": { | ||
"type": "list", | ||
"mixins": [ | ||
{ | ||
"target": "smithy.ruby.tests#MyMixin" | ||
} | ||
] | ||
}, | ||
"smithy.ruby.tests#MyList$member": { | ||
"type": "apply", | ||
"traits": { | ||
"smithy.api#documentation": "Specific docs" | ||
} | ||
}, | ||
"smithy.ruby.tests#MyMixin": { | ||
"type": "list", | ||
"member": { | ||
"target": "smithy.api#String", | ||
"traits": { | ||
"smithy.api#documentation": "Generic docs" | ||
} | ||
}, | ||
"traits": { | ||
"smithy.api#mixin": {} | ||
} | ||
} | ||
} | ||
} |
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,12 @@ | ||
$version: "2" | ||
|
||
namespace smithy.ruby.tests | ||
|
||
@mixin | ||
list MyMixin { | ||
/// Generic docs | ||
member: String | ||
} | ||
|
||
list MyList with [MyMixin] {} | ||
apply MyList$member @documentation("Specific docs") |
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,43 @@ | ||
{ | ||
"smithy": "2.0", | ||
"shapes": { | ||
"smithy.ruby.tests#MyMap": { | ||
"type": "map", | ||
"mixins": [ | ||
{ | ||
"target": "smithy.ruby.tests#MyMixin" | ||
} | ||
] | ||
}, | ||
"smithy.ruby.tests#MyMap$key": { | ||
"type": "apply", | ||
"traits": { | ||
"smithy.api#documentation": "Specific docs" | ||
} | ||
}, | ||
"smithy.ruby.tests#MyMap$value": { | ||
"type": "apply", | ||
"traits": { | ||
"smithy.api#documentation": "Specific docs" | ||
} | ||
}, | ||
"smithy.ruby.tests#MyMixin": { | ||
"type": "map", | ||
"key": { | ||
"target": "smithy.api#String", | ||
"traits": { | ||
"smithy.api#documentation": "Generic docs" | ||
} | ||
}, | ||
"value": { | ||
"target": "smithy.api#String", | ||
"traits": { | ||
"smithy.api#documentation": "Generic docs" | ||
} | ||
}, | ||
"traits": { | ||
"smithy.api#mixin": {} | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
$version: "2" | ||
|
||
namespace smithy.ruby.tests | ||
|
||
@mixin | ||
map MyMixin { | ||
/// Generic docs | ||
key: String | ||
/// Generic docs | ||
value: String | ||
} | ||
|
||
map MyMap with [MyMixin] {} | ||
apply MyMap$key @documentation("Specific docs") | ||
apply MyMap$value @documentation("Specific docs") |
File renamed without changes.
File renamed without changes.
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,34 @@ | ||
{ | ||
"smithy": "2.0", | ||
"shapes": { | ||
"smithy.ruby.tests#MyMixin": { | ||
"type": "union", | ||
"members": { | ||
"mixinMember": { | ||
"target": "smithy.api#String", | ||
"traits": { | ||
"smithy.api#documentation": "Generic docs" | ||
} | ||
} | ||
}, | ||
"traits": { | ||
"smithy.api#mixin": {} | ||
} | ||
}, | ||
"smithy.ruby.tests#MyUnion": { | ||
"type": "union", | ||
"mixins": [ | ||
{ | ||
"target": "smithy.ruby.tests#MyMixin" | ||
} | ||
], | ||
"members": {} | ||
}, | ||
"smithy.ruby.tests#MyUnion$mixinMember": { | ||
"type": "apply", | ||
"traits": { | ||
"smithy.api#documentation": "Specific docs" | ||
} | ||
} | ||
} | ||
} |
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,12 @@ | ||
$version: "2" | ||
|
||
namespace smithy.ruby.tests | ||
|
||
@mixin | ||
union MyMixin { | ||
/// Generic docs | ||
mixinMember: String | ||
} | ||
|
||
union MyUnion with [MyMixin] {} | ||
apply MyUnion$mixinMember @documentation("Specific docs") |
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