-
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.
Update trait examples to use smithy-trait-package plugin
- Loading branch information
Showing
36 changed files
with
98 additions
and
248 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
2 changes: 1 addition & 1 deletion
2
custom-trait-examples/custom-annotation-trait/model/custom-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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
namespace example.traits | ||
|
||
@trait(selector: "structure") | ||
structure special {} |
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
14 changes: 12 additions & 2 deletions
14
custom-trait-examples/custom-annotation-trait/smithy-build.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 |
---|---|---|
@@ -1,3 +1,13 @@ | ||
{ | ||
"version": "1.0" | ||
} | ||
"version": "1.0", | ||
"plugins": { | ||
"trait-codegen": { | ||
"package": "io.examples.traits", | ||
"namespace": "example.traits", | ||
"header": [ | ||
"Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.", | ||
"SPDX-License-Identifier: MIT-0" | ||
] | ||
} | ||
} | ||
} |
30 changes: 0 additions & 30 deletions
30
...xamples/custom-annotation-trait/src/main/java/io/smithy/examples/traits/SpecialTrait.java
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ait/src/main/resources/META-INF/services/software.amazon.smithy.model.traits.TraitService
This file was deleted.
Oops, something went wrong.
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
custom-trait-examples/custom-string-trait/model/custom-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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
$version: "2.0" | ||
|
||
namespace io.smithy.example | ||
namespace example.traits | ||
|
||
@trait(selector: "member") | ||
string jsonName |
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
13 changes: 13 additions & 0 deletions
13
custom-trait-examples/custom-string-trait/smithy-build.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,13 @@ | ||
{ | ||
"version": "1.0", | ||
"plugins": { | ||
"trait-codegen": { | ||
"package": "io.examples.traits", | ||
"namespace": "example.traits", | ||
"header": [ | ||
"Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.", | ||
"SPDX-License-Identifier: MIT-0" | ||
] | ||
} | ||
} | ||
} |
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
30 changes: 0 additions & 30 deletions
30
...t-examples/custom-string-trait/src/main/java/io/smithy/examples/traits/JsonNameTrait.java
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ait/src/main/resources/META-INF/services/software.amazon.smithy.model.traits.TraitService
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...it/src/main/resources/META-INF/services/software.amazon.smithy.model.validation.Validator
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 @@ | ||
io.smithy.examples.validators.JsonNameTraitValidator | ||
io.examples.validators.JsonNameTraitValidator |
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
4 changes: 2 additions & 2 deletions
4
...examples/validators/validator-test.smithy → ...examples/validators/validator-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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
$version: "2.0" | ||
|
||
namespace io.smithy.example.test | ||
namespace example.test | ||
|
||
structure TestStructure { | ||
@io.smithy.example#jsonName("TESTING") | ||
@example.traits#jsonName("TESTING") | ||
@smithy.api#jsonName("OOPS! DUPLICATION!") | ||
testMember: String | ||
} |
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
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
13 changes: 13 additions & 0 deletions
13
custom-trait-examples/custom-structure-trait/smithy-build.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,13 @@ | ||
{ | ||
"version": "1.0", | ||
"plugins": { | ||
"trait-codegen": { | ||
"package": "io.examples.traits", | ||
"namespace": "example.traits", | ||
"header": [ | ||
"Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.", | ||
"SPDX-License-Identifier: MIT-0" | ||
] | ||
} | ||
} | ||
} |
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
Oops, something went wrong.