-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to find input/output/error bindings
This updates the operation index to allow you to easily find all the operations for which a given shape is used as an input or output and all the operations or services for which a given shape is used as an error.
- Loading branch information
1 parent
0a4b0fd
commit 1b5a65a
Showing
4 changed files
with
148 additions
and
84 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
81 changes: 0 additions & 81 deletions
81
...model/src/test/resources/software/amazon/smithy/model/knowledge/operation-index-test.json
This file was deleted.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
...del/src/test/resources/software/amazon/smithy/model/knowledge/operation-index-test.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,58 @@ | ||
$version: "2.0" | ||
|
||
namespace ns.foo | ||
|
||
service MyService { | ||
version: "2017-01-17" | ||
operations: [ | ||
A | ||
B | ||
] | ||
errors: [ | ||
CommonError1 | ||
CommonError2 | ||
] | ||
} | ||
|
||
@readonly | ||
operation A { | ||
input: Unit | ||
output: Unit | ||
} | ||
|
||
@readonly | ||
operation B { | ||
input: Input | ||
output: Output | ||
errors: [ | ||
Error1 | ||
Error2 | ||
] | ||
} | ||
|
||
operation C { | ||
input: Input | ||
output: Output, | ||
errors: [ | ||
CommonError1 | ||
] | ||
} | ||
|
||
@error("server") | ||
structure CommonError1 {} | ||
|
||
@error("server") | ||
structure CommonError2 {} | ||
|
||
@error("client") | ||
structure Error1 {} | ||
|
||
@error("server") | ||
structure Error2 {} | ||
|
||
@error("client") | ||
structure UnusedError {} | ||
|
||
structure Input {} | ||
|
||
structure Output {} |