File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Tests/AWSLambdaEventsTests Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,10 @@ extension Encodable {
3232extension APIGatewayResponse {
3333
3434 public init < Input: Encodable > (
35+ body: Input ,
3536 statusCode: HTTPResponse . Status ,
3637 headers: HTTPHeaders ? = nil ,
37- multiValueHeaders: HTTPMultiValueHeaders ? = nil ,
38- body: Input
38+ multiValueHeaders: HTTPMultiValueHeaders ? = nil
3939 ) throws {
4040 self . init (
4141 statusCode: statusCode,
@@ -50,9 +50,9 @@ extension APIGatewayResponse {
5050extension APIGatewayV2Response {
5151
5252 public init < Input: Encodable > (
53+ body: Input ,
5354 statusCode: HTTPResponse . Status ,
5455 headers: HTTPHeaders ? = nil ,
55- body: Input ,
5656 cookies: [ String ] ? = nil
5757 ) throws {
5858 self . init (
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ struct APIGatewayEncodableResponseTests {
3333
3434 var response : APIGatewayV2Response ? = nil
3535 #expect( throws: Never . self) {
36- try response = APIGatewayV2Response ( statusCode : . ok , body : businessResponse )
36+ try response = APIGatewayV2Response ( body : businessResponse , statusCode : . ok )
3737 }
3838 try #require( response? . body != nil )
3939
@@ -57,7 +57,7 @@ struct APIGatewayEncodableResponseTests {
5757
5858 var response : APIGatewayResponse ? = nil
5959 #expect( throws: Never . self) {
60- try response = APIGatewayResponse ( statusCode : . ok , body : businessResponse )
60+ try response = APIGatewayResponse ( body : businessResponse , statusCode : . ok )
6161 }
6262 try #require( response? . body != nil )
6363
Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ class APIGatewayTests: XCTestCase {
9595 let isBase64Encoded : Bool ?
9696 }
9797
98- func testResponseEncoding( ) throws {
99- let resp = try APIGatewayResponse (
98+ func testResponseEncoding( ) {
99+ let resp = APIGatewayResponse (
100100 statusCode: . ok,
101101 headers: [ " Server " : " Test " ] ,
102102 body: " abc123 "
You can’t perform that action at this time.
0 commit comments