Skip to content

Commit

Permalink
Merge pull request #39 from amzn/smoke_aws_support
Browse files Browse the repository at this point in the history
Update generation to depend on smoke-aws-support
  • Loading branch information
tachyonics authored Oct 17, 2022
2 parents 602ce27 + 02ab690 commit 3c48e9f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 26 deletions.
12 changes: 6 additions & 6 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@
"repositoryURL": "https://github.com/mattpolzin/OpenAPIKit.git",
"state": {
"branch": null,
"revision": "0c668112f9803c1858ed070f9e8ce84922a0b41f",
"version": "3.0.0-alpha.4"
"revision": "15e39d1594b5da2b11d63f141203296d48cc5213",
"version": "3.0.0-alpha.5"
}
},
{
"package": "ServiceModelSwiftCodeGenerate",
"repositoryURL": "https://github.com/amzn/service-model-swift-code-generate.git",
"state": {
"branch": null,
"revision": "19a9564478f4f929683a36c66aa92d858dc66c8d",
"version": "3.0.0-beta.14"
"revision": "42c354dc16893d30d602bd24f8f570f20fc6206a",
"version": "3.0.0-rc.1"
}
},
{
"package": "SmokeAWSGenerate",
"repositoryURL": "https://github.com/amzn/smoke-aws-generate.git",
"state": {
"branch": null,
"revision": "5f694d8bd7222ef4654d67bf59fbcbcdc0e8eb00",
"version": "3.0.0-beta.10"
"revision": "8d2dcd6f7782cd76ff7c98aae58a6a515281f4d5",
"version": "3.0.0-rc.1"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ let package = Package(
targets: ["SmokeFrameworkGenerateHttp1"]),
],
dependencies: [
.package(url: "https://github.com/amzn/smoke-aws-generate.git", from: "3.0.0-beta.10"),
.package(url: "https://github.com/amzn/service-model-swift-code-generate.git", from: "3.0.0-beta.14"),
.package(url: "https://github.com/amzn/smoke-aws-generate.git", from: "3.0.0-rc.1"),
.package(url: "https://github.com/amzn/service-model-swift-code-generate.git", from: "3.0.0-rc.1"),
.package(url: "https://github.com/amzn/openapi-swift-code-generate.git", from: "1.0.0-beta.1"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
],
Expand Down
4 changes: 2 additions & 2 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ let package = Package(
],
dependencies: [
.package(name: "SmokeAWSGenerate",
url: "https://github.com/amzn/smoke-aws-generate.git", from: "3.0.0-beta.10"),
url: "https://github.com/amzn/smoke-aws-generate.git", from: "3.0.0-rc.1"),
.package(name: "ServiceModelSwiftCodeGenerate",
url: "https://github.com/amzn/service-model-swift-code-generate.git", from: "3.0.0-beta.14"),
url: "https://github.com/amzn/service-model-swift-code-generate.git", from: "3.0.0-rc.1"),
.package(url: "https://github.com/amzn/openapi-swift-code-generate.git", from: "1.0.0-beta.1"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
],
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ For the Client package-
name: "EmptyExampleClient", dependencies: [
.target(name: "EmptyExampleModel"),
.product(name: "SmokeOperationsHTTP1", package: "smoke-framework"),
.product(name: "SmokeAWSHttp", package: "smoke-aws"),
.product(name: "AWSHttp", package: "smoke-aws-support"),
],
plugins: [
.plugin(name: "SmokeFrameworkGenerateClient", package: "smoke-framework-application-generate")
Expand Down Expand Up @@ -330,7 +330,7 @@ and then as a dependency of any targets you are using the SPM plugin for.
name: "EmptyExampleClient", dependencies: [
.target(name: "EmptyExampleModel"),
.product(name: "SmokeOperationsHTTP1", package: "smoke-framework"),
.product(name: "SmokeAWSHttp", package: "smoke-aws"),
.product(name: "AWSHttp", package: "smoke-aws-support"),
.product(name: "MyModelPackage", package: "my-model-package"),
],
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ private struct HttpClientSignatureParameters {
extension ModelClientDelegate {
func addAWSClientFileHeader(fileBuilder: FileBuilder, baseName: String) {
fileBuilder.appendLine("""
import SmokeAWSCore
import SmokeAWSHttp
import AWSCore
import AWSHttp
import NIO
import NIOHTTP1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extension ServiceModelCodeGenerator where TargetSupportType: HTTP1IntegrationTar
import SmokeHTTP1
import SmokeOperationsHTTP1
import SmokeOperationsHTTP1Server
import SmokeAWSCore
import AWSLogging
import NIO
typealias \(baseName)OperationDelegate = JSONPayloadHTTP1OperationDelegate<SmokeInvocationTraceContext>
Expand Down Expand Up @@ -161,7 +161,7 @@ extension ServiceModelCodeGenerator where TargetSupportType: HTTP1IntegrationTar
import \(baseName)Operations
import \(http1IntegrationTargetName)
import SmokeOperationsHTTP1Server
import SmokeAWSCore
import AWSLogging
import NIO
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ extension ServiceModelCodeGenerator where TargetSupportType: ModelTargetSupport
dependencies: [
.package(url: "https://github.com/amzn/smoke-framework.git", from: "2.7.0"),
.package(url: "https://github.com/amzn/smoke-aws-credentials.git", from: "2.0.0"),
.package(url: "https://github.com/amzn/smoke-aws.git", from: "2.0.0"),
.package(url: "https://github.com/amzn/smoke-aws-support.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
""")

if case .serverWithPlugin = generationType {
fileBuilder.appendLine("""
.package(url: "https://github.com/amzn/smoke-framework-application-generate", from: "3.0.0-beta.1")
.package(url: "https://github.com/amzn/smoke-framework-application-generate", from: "3.0.0-rc.1")
""")
}

Expand Down Expand Up @@ -170,7 +170,7 @@ extension ServiceModelCodeGenerator where TargetSupportType: ModelTargetSupport
name: "\(clientTargetName)", dependencies: [
.target(name: "\(modelTargetName)"),
.product(name: "SmokeOperationsHTTP1", package: "smoke-framework"),
.product(name: "SmokeAWSHttp", package: "smoke-aws"),
.product(name: "AWSHttp", package: "smoke-aws-support"),
""")

if case .serverWithPlugin = generationType {
Expand All @@ -188,6 +188,7 @@ extension ServiceModelCodeGenerator where TargetSupportType: ModelTargetSupport
.target(name: "\(http1IntegrationTargetName)"),
.product(name: "SmokeAWSCredentials", package: "smoke-aws-credentials"),
.product(name: "SmokeOperationsHTTP1Server", package: "smoke-framework"),
.product(name: "AWSLogging", package: "smoke-aws-support"),
]),
.testTarget(
name: "\(baseName)OperationsTests", dependencies: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@ extension ServiceModelCodeGenerator where TargetSupportType: ModelTargetSupport
generatorFileType = .clientGenerator
}

generateClient(delegate: clientProtocolDelegate, fileType: .clientImplementation)
generateClient(delegate: mockClientDelegate, fileType: .clientImplementation)
generateClient(delegate: throwingClientDelegate, fileType: .clientImplementation)
generateClient(delegate: awsClientDelegate, fileType: .clientImplementation)
generateClient(delegate: awsClientDelegate, fileType: generatorFileType)
generateOperationsReporting()
generateInvocationsReporting()
generateAWSClient(delegate: clientProtocolDelegate, fileType: .clientImplementation)
generateAWSClient(delegate: mockClientDelegate, fileType: .clientImplementation)
generateAWSClient(delegate: throwingClientDelegate, fileType: .clientImplementation)
generateAWSClient(delegate: awsClientDelegate, fileType: .clientImplementation)
generateAWSClient(delegate: awsClientDelegate, fileType: generatorFileType)
generateAWSOperationsReporting()
generateAWSInvocationsReporting()
generateModelOperationClientInput()
generateModelOperationClientOutput()
} else if generationType.isWithPlugin {
Expand Down

0 comments on commit 3c48e9f

Please sign in to comment.