File tree 2 files changed +30
-0
lines changed
codegen/generic-client-test-codegen
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ plugins {
37
37
dependencies {
38
38
implementation(" software.amazon.smithy:smithy-aws-protocol-tests:$smithyVersion " )
39
39
implementation(" software.amazon.smithy:smithy-aws-traits:$smithyVersion " )
40
+ implementation(" software.amazon.smithy:smithy-rules-engine:$smithyVersion " )
40
41
implementation(project(" :smithy-aws-typescript-codegen" ))
41
42
}
42
43
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ $version: "2.0"
3
3
namespace example.weather
4
4
5
5
use aws.auth#sigv4
6
+ use aws.api#service
6
7
7
8
@authDefinition
8
9
@trait
@@ -12,6 +13,7 @@ structure customAuth {}
12
13
@protocolDefinition
13
14
structure fakeProtocol {}
14
15
16
+ @service (sdkId : " weather" )
15
17
@fakeProtocol
16
18
@httpApiKeyAuth (name : " X-Api-Key" , in : " header" )
17
19
@httpBearerAuth
@@ -86,3 +88,30 @@ operation SameAsService {
86
88
service : String
87
89
}
88
90
}
91
+
92
+ apply Weather @smithy.rules#endpointRuleSet ({
93
+ "version" : " 1.3" ,
94
+ "parameters" : {
95
+ "Region" : {
96
+ "required" : true ,
97
+ "type" : " String" ,
98
+ "documentation" : " docs"
99
+ }
100
+ },
101
+ "rules" : [
102
+ {
103
+ "conditions" : [],
104
+ "documentation" : " base rule" ,
105
+ "endpoint" : {
106
+ "url" : " https://{Region}.amazonaws.com" ,
107
+ "properties" : {},
108
+ "headers" : {}
109
+ },
110
+ "type" : " endpoint"
111
+ }
112
+ ]
113
+ })
114
+
115
+ apply Weather @smithy.rules#clientContextParams (
116
+ Region : {type : " string" , documentation : " docs" }
117
+ )
You can’t perform that action at this time.
0 commit comments