-
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.
Allow anything but operations, services, and resources to have the sensitive trait.
- Loading branch information
1 parent
80543b3
commit c2ec0a5
Showing
4 changed files
with
35 additions
and
3 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
1 change: 1 addition & 0 deletions
1
.../test/resources/software/amazon/smithy/model/errorfiles/validators/sensitive-trait.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#Operation: Trait `sensitive` cannot be applied to `ns.foo#Operation`. This trait may only be applied to shapes that match the following selector: :not(:test(service, operation, resource)) | TraitTarget |
31 changes: 31 additions & 0 deletions
31
...rc/test/resources/software/amazon/smithy/model/errorfiles/validators/sensitive-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,31 @@ | ||
{ | ||
"smithy": "0.4.0", | ||
"ns.foo": { | ||
"shapes": { | ||
"Operation": { | ||
"type": "operation", | ||
"smithy.api#sensitive": true | ||
}, | ||
"Structure": { | ||
"type": "structure", | ||
"members": { | ||
"a": { | ||
"target": "String" | ||
} | ||
}, | ||
"smithy.api#sensitive": true | ||
}, | ||
"Blob": { | ||
"type": "blob", | ||
"smithy.api#sensitive": true | ||
}, | ||
"String": { | ||
"type": "string" | ||
}, | ||
"SensitiveString": { | ||
"type": "string", | ||
"smithy.api#sensitive": true | ||
} | ||
} | ||
} | ||
} |