Skip to content

Commit

Permalink
Add S3 traits
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Jul 18, 2021
1 parent b53ab0d commit d2aadcd
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public struct HttpQueryTrait: SingleValueTrait {
}
}

/// Binds an operation input structure member to a query string parameter.
/// Binds a map of key-value pairs to query string parameters.
public struct HttpQueryParamsTrait: StaticTrait {
public static let staticName: ShapeId = "smithy.api#httpQueryParams"
public var selector: Selector { TargetSelector(TypeSelector<MapShape>()) }
Expand Down
12 changes: 10 additions & 2 deletions Sources/SotoSmithyAWS/Smithy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2020 the Soto project authors
// Copyright (c) 2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand Down Expand Up @@ -53,7 +53,15 @@ extension Smithy {
AwsApiGatewayAuthorizerTrait.self,
AwsApiGatewayRequestValidatorTrait.self,
AwsApiGatewayIntegrationTrait.self,
AwsApiGatewayMockIntegrationTrait.self
AwsApiGatewayMockIntegrationTrait.self,
// AWS CloudFormation traits
AwsCloudFormationResourceTrait.self,
AwsCloudFormationExcludePropertyTrait.self,
AwsCloudFormationMutabilityTrait.self,
AwsCloudFormationNameTrait.self,
AwsCloudFormationAdditionalIdentifierTrait.self,
// S3 traits
AwsS3UnwrappedXmlOutputTrait.self
)
}
}
5 changes: 3 additions & 2 deletions Sources/SotoSmithyAWS/Traits/AwsProtocolTraits.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2020 the Soto project authors
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand Down Expand Up @@ -44,7 +44,8 @@ public struct AwsProtocolsAwsQueryTrait: StaticTrait {
public var selector: Selector { return TypeSelector<ServiceShape>() }
}

/// Defines an HTTP response code for an operation error.
/// Provides a custom "Code" value for awsQuery errors and an HTTP response code. The "Code" of an
/// awsQuery error is used by clients to determine which type of error was encountered..
public struct AwsProtocolsAwsQueryErrorTrait: StaticTrait {
public static let staticName: ShapeId = "aws.protocols#awsQueryError"
public var selector: Selector { AndSelector(TypeSelector<StructureShape>(), TraitSelector<ErrorTrait>()) }
Expand Down
20 changes: 20 additions & 0 deletions Sources/SotoSmithyAWS/Traits/AwsS3Traits.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import SotoSmithy

public struct AwsS3UnwrappedXmlOutputTrait: StaticTrait {
public static let staticName: ShapeId = "aws.customizations#s3UnwrappedXmlOutput"
public var selector: Selector { TypeSelector<OperationShape>() }
}

0 comments on commit d2aadcd

Please sign in to comment.