-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
@httpResponseCode
to not be applicable to @input
structures
- Changed the selector of `@httpResponseCode` to not select structures with the `@input` trait applied - Updated the docs for `@httpResponseCode` - Move `http-trait-conflicts` test to a `.smithy` file Resolves #1105
- Loading branch information
Steven Yuan
committed
Aug 26, 2022
1 parent
b0f2bc2
commit e0cd375
Showing
8 changed files
with
47 additions
and
41 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
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
1 change: 1 addition & 0 deletions
1
...tware/amazon/smithy/model/errorfiles/validators/http-response-code-input-conflicts.errors
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 @@ | ||
[ERROR] ns.foo#HttpOperationInput$Int: Trait `httpResponseCode` cannot be applied to `ns.foo#HttpOperationInput$Int`. This trait may only be applied to shapes that match the following selector: structure :not([trait|input]) > member :test(> integer) | TraitTarget |
11 changes: 11 additions & 0 deletions
11
...tware/amazon/smithy/model/errorfiles/validators/http-response-code-input-conflicts.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,11 @@ | ||
$version: "2.0" | ||
|
||
namespace ns.foo | ||
|
||
@input | ||
structure HttpOperationInput { | ||
|
||
@httpResponseCode | ||
Int: Integer | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
.../resources/software/amazon/smithy/model/errorfiles/validators/http-trait-conflicts.errors
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 +1 @@ | ||
[ERROR] ns.foo#HttpOperationInput$Int: Found conflicting traits on member shape: `httpHeader` conflicts with `httpLabel`, `httpHeader` conflicts with `httpQuery`, `httpHeader` conflicts with `httpResponseCode`, `httpLabel` conflicts with `httpHeader`, `httpLabel` conflicts with `httpQuery`, `httpLabel` conflicts with `httpResponseCode`, `httpQuery` conflicts with `httpHeader`, `httpQuery` conflicts with `httpLabel`, `httpQuery` conflicts with `httpResponseCode`, `httpResponseCode` conflicts with `httpHeader`, `httpResponseCode` conflicts with `httpLabel`, `httpResponseCode` conflicts with `httpQuery` | TraitConflict | ||
[ERROR] ns.foo#HttpOperationOutput$Int: Found conflicting traits on member shape: `httpHeader` conflicts with `httpLabel`, `httpHeader` conflicts with `httpQuery`, `httpHeader` conflicts with `httpResponseCode`, `httpLabel` conflicts with `httpHeader`, `httpLabel` conflicts with `httpQuery`, `httpLabel` conflicts with `httpResponseCode`, `httpQuery` conflicts with `httpHeader`, `httpQuery` conflicts with `httpLabel`, `httpQuery` conflicts with `httpResponseCode`, `httpResponseCode` conflicts with `httpHeader`, `httpResponseCode` conflicts with `httpLabel`, `httpResponseCode` conflicts with `httpQuery` | TraitConflict |
23 changes: 0 additions & 23 deletions
23
...st/resources/software/amazon/smithy/model/errorfiles/validators/http-trait-conflicts.json
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
.../resources/software/amazon/smithy/model/errorfiles/validators/http-trait-conflicts.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 @@ | ||
$version: "2.0" | ||
|
||
namespace ns.foo | ||
|
||
@output | ||
structure HttpOperationOutput { | ||
|
||
@required | ||
@httpResponseCode | ||
@httpLabel | ||
@httpQuery("foo") | ||
@httpHeader("x-amz-foo") | ||
Int: Integer | ||
|
||
} |