Skip to content

Commit 63f6a01

Browse files
committed
Fix ktlint
1 parent 61eedfa commit 63f6a01

File tree

6 files changed

+30
-22
lines changed

6 files changed

+30
-22
lines changed

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/protocols/awsjson/AWSJSON1_0ProtocolGenerator.kt

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import software.amazon.smithy.model.shapes.ShapeId
1515
import software.amazon.smithy.model.traits.HostLabelTrait
1616
import software.amazon.smithy.swift.codegen.integration.HttpBindingResolver
1717
import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator
18-
import software.amazon.smithy.swift.codegen.integration.isInHttpBody
1918
import software.amazon.smithy.swift.codegen.integration.isEventStreaming
2019
import software.amazon.smithy.swift.codegen.integration.middlewares.ContentTypeMiddleware
2120
import software.amazon.smithy.swift.codegen.integration.middlewares.OperationInputBodyMiddleware
@@ -60,8 +59,11 @@ class AWSJSON1_0ProtocolGenerator : AWSHTTPBindingProtocolGenerator(AWSJSONCusto
6059
)
6160
}
6261

63-
override fun httpBodyMembers(ctx: ProtocolGenerator.GenerationContext, shape: Shape): List<MemberShape> {
64-
return shape
62+
override fun httpBodyMembers(
63+
ctx: ProtocolGenerator.GenerationContext,
64+
shape: Shape,
65+
): List<MemberShape> =
66+
shape
6567
.members()
6668
// The only place an input member can be bound to in AWS JSON other than the body
6769
// is the host prefix, using the host label trait.
@@ -70,5 +72,4 @@ class AWSJSON1_0ProtocolGenerator : AWSHTTPBindingProtocolGenerator(AWSJSONCusto
7072
// with streaming member excluded during encoding the input struct.
7173
.filter { !it.targetOrSelf(ctx.model).isEventStreaming }
7274
.toList()
73-
}
7475
}

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/protocols/awsjson/AWSJSON1_1ProtocolGenerator.kt

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import software.amazon.smithy.model.traits.HostLabelTrait
1616
import software.amazon.smithy.swift.codegen.integration.HttpBindingResolver
1717
import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator
1818
import software.amazon.smithy.swift.codegen.integration.isEventStreaming
19-
import software.amazon.smithy.swift.codegen.integration.isInHttpBody
2019
import software.amazon.smithy.swift.codegen.integration.middlewares.ContentTypeMiddleware
2120
import software.amazon.smithy.swift.codegen.integration.middlewares.OperationInputBodyMiddleware
2221
import software.amazon.smithy.swift.codegen.model.hasTrait
@@ -58,8 +57,11 @@ class AWSJSON1_1ProtocolGenerator : AWSHTTPBindingProtocolGenerator(AWSJSONCusto
5857
)
5958
}
6059

61-
override fun httpBodyMembers(ctx: ProtocolGenerator.GenerationContext, shape: Shape): List<MemberShape> {
62-
return shape
60+
override fun httpBodyMembers(
61+
ctx: ProtocolGenerator.GenerationContext,
62+
shape: Shape,
63+
): List<MemberShape> =
64+
shape
6365
.members()
6466
// The only place an input member can be bound to in AWS JSON other than the body
6567
// is the host prefix, using the host label trait.
@@ -68,5 +70,4 @@ class AWSJSON1_1ProtocolGenerator : AWSHTTPBindingProtocolGenerator(AWSJSONCusto
6870
// with streaming member excluded during encoding the input struct.
6971
.filter { !it.targetOrSelf(ctx.model).isEventStreaming }
7072
.toList()
71-
}
7273
}

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/protocols/awsquery/AWSQueryProtocolGenerator.kt

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import software.amazon.smithy.model.shapes.ShapeId
1515
import software.amazon.smithy.model.traits.HostLabelTrait
1616
import software.amazon.smithy.swift.codegen.integration.HttpBindingResolver
1717
import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator
18-
import software.amazon.smithy.swift.codegen.integration.isInHttpBody
1918
import software.amazon.smithy.swift.codegen.integration.middlewares.ContentTypeMiddleware
2019
import software.amazon.smithy.swift.codegen.integration.middlewares.OperationInputBodyMiddleware
2120
import software.amazon.smithy.swift.codegen.model.hasTrait
@@ -54,12 +53,14 @@ open class AWSQueryProtocolGenerator : AWSHTTPBindingProtocolGenerator(AWSQueryC
5453
)
5554
}
5655

57-
override fun httpBodyMembers(ctx: ProtocolGenerator.GenerationContext, shape: Shape): List<MemberShape> {
58-
return shape
56+
override fun httpBodyMembers(
57+
ctx: ProtocolGenerator.GenerationContext,
58+
shape: Shape,
59+
): List<MemberShape> =
60+
shape
5961
.members()
6062
// The only place an input member can be bound to in AWSQuery other than the body
6163
// is the host prefix, using the host label trait.
6264
.filter { !it.hasTrait<HostLabelTrait>() }
6365
.toList()
64-
}
6566
}

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/protocols/ec2query/EC2QueryProtocolGenerator.kt

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import software.amazon.smithy.model.shapes.ShapeId
1515
import software.amazon.smithy.model.traits.HostLabelTrait
1616
import software.amazon.smithy.swift.codegen.integration.HttpBindingResolver
1717
import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator
18-
import software.amazon.smithy.swift.codegen.integration.isInHttpBody
1918
import software.amazon.smithy.swift.codegen.integration.middlewares.ContentTypeMiddleware
2019
import software.amazon.smithy.swift.codegen.integration.middlewares.OperationInputBodyMiddleware
2120
import software.amazon.smithy.swift.codegen.model.hasTrait
@@ -54,12 +53,14 @@ class EC2QueryProtocolGenerator : AWSHTTPBindingProtocolGenerator(EC2QueryCustom
5453
)
5554
}
5655

57-
override fun httpBodyMembers(ctx: ProtocolGenerator.GenerationContext, shape: Shape): List<MemberShape> {
58-
return shape
56+
override fun httpBodyMembers(
57+
ctx: ProtocolGenerator.GenerationContext,
58+
shape: Shape,
59+
): List<MemberShape> =
60+
shape
5961
.members()
6062
// The only place an input member can be bound to in EC2Query other than the body
6163
// is the host prefix, using the host label trait.
6264
.filter { !it.hasTrait<HostLabelTrait>() }
6365
.toList()
64-
}
6566
}

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/protocols/restjson/AWSRestJson1ProtocolGenerator.kt

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ class AWSRestJson1ProtocolGenerator : AWSHTTPBindingProtocolGenerator(RestJSONCu
2323
"RestJsonClientPopulatesDefaultsValuesWhenMissingInResponse", // TODO: broken in Smithy 1.53.0
2424
)
2525

26-
override fun httpBodyMembers(ctx: ProtocolGenerator.GenerationContext, shape: Shape): List<MemberShape> {
27-
return shape
26+
override fun httpBodyMembers(
27+
ctx: ProtocolGenerator.GenerationContext,
28+
shape: Shape,
29+
): List<MemberShape> =
30+
shape
2831
.members()
2932
.filter { it.isInHttpBody() }
3033
.toList()
31-
}
3234
}

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/protocols/restxml/RestXMLProtocolGenerator.kt

+5-3
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ class RestXMLProtocolGenerator : AWSHTTPBindingProtocolGenerator(RestXMLCustomiz
4040
}
4141
}
4242

43-
override fun httpBodyMembers(ctx: ProtocolGenerator.GenerationContext, shape: Shape): List<MemberShape> {
44-
return shape
43+
override fun httpBodyMembers(
44+
ctx: ProtocolGenerator.GenerationContext,
45+
shape: Shape,
46+
): List<MemberShape> =
47+
shape
4548
.members()
4649
.filter { it.isInHttpBody() }
4750
.toList()
48-
}
4951
}

0 commit comments

Comments
 (0)