Skip to content

Commit

Permalink
Merge pull request #42 from amzn/trace_context_type_fix
Browse files Browse the repository at this point in the history
Fix issue with trace context type.
  • Loading branch information
tachyonics authored May 24, 2023
2 parents 17a6440 + a174dfe commit 89c4a2d
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ extension ServiceModelCodeGenerator where TargetSupportType: ModelTargetSupport
generatorFileType = .clientGenerator
}

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)
generateSmokeFrameworkClient(delegate: clientProtocolDelegate, fileType: .clientImplementation)
generateSmokeFrameworkClient(delegate: mockClientDelegate, fileType: .clientImplementation)
generateSmokeFrameworkClient(delegate: throwingClientDelegate, fileType: .clientImplementation)
generateSmokeFrameworkClient(delegate: awsClientDelegate, fileType: .clientImplementation)
generateSmokeFrameworkClient(delegate: awsClientDelegate, fileType: generatorFileType)
generateAWSOperationsReporting()
generateAWSInvocationsReporting()
generateModelOperationClientInput()
Expand Down Expand Up @@ -335,6 +335,13 @@ extension ServiceModelCodeGenerator where TargetSupportType: ModelTargetSupport
generationType: generationType)
}
}

private func generateSmokeFrameworkClient<DelegateType: ModelClientDelegate>(delegate: DelegateType, fileType: ClientFileType)
where DelegateType.TargetSupportType == TargetSupportType, DelegateType.ModelType == ModelType {
let defaultTraceContextType = DefaultTraceContextType(typeName: "SmokeInvocationTraceContext",
importTargetName: "SmokeOperationsHTTP1")
generateClient(delegate: delegate, fileType: fileType, defaultTraceContextType: defaultTraceContextType)
}

// Due to a current limitation of the SPM plugins for code generators, a placeholder Swift file
// is required in each package to avoid the package as being seen as empty. These files need to
Expand Down

0 comments on commit 89c4a2d

Please sign in to comment.