Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codegen/generic-client-test-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ plugins {
dependencies {
implementation("software.amazon.smithy:smithy-aws-protocol-tests:$smithyVersion")
implementation("software.amazon.smithy:smithy-aws-traits:$smithyVersion")
implementation("software.amazon.smithy:smithy-rules-engine:$smithyVersion")
implementation(project(":smithy-aws-typescript-codegen"))
}

Expand Down
29 changes: 29 additions & 0 deletions codegen/generic-client-test-codegen/model/weather.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $version: "2.0"
namespace example.weather

use aws.auth#sigv4
use aws.api#service

@authDefinition
@trait
Expand All @@ -12,6 +13,7 @@ structure customAuth {}
@protocolDefinition
structure fakeProtocol {}

@service(sdkId: "weather")
@fakeProtocol
@httpApiKeyAuth(name: "X-Api-Key", in: "header")
@httpBearerAuth
Expand Down Expand Up @@ -86,3 +88,30 @@ operation SameAsService {
service: String
}
}

apply Weather @smithy.rules#endpointRuleSet({
"version": "1.3",
"parameters": {
"Region": {
"required": true,
"type": "String",
"documentation": "docs"
}
},
"rules": [
{
"conditions": [],
"documentation": "base rule",
"endpoint": {
"url": "https://{Region}.amazonaws.com",
"properties": {},
"headers": {}
},
"type": "endpoint"
}
]
})

apply Weather @smithy.rules#clientContextParams(
Region: {type: "string", documentation: "docs"}
)