diff --git a/Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore/Server.swift b/Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore/Server.swift index 8b148046b..f10136145 100644 --- a/Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore/Server.swift +++ b/Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore/Server.swift @@ -290,7 +290,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .ok(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 200) + var response = Response(statusCode: 200) suppressMutabilityWarning(&response) switch value.body { case let .json(value): @@ -350,7 +350,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .accepted(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 202) + var response = Response(statusCode: 202) suppressMutabilityWarning(&response) return response case let .undocumented(statusCode, _): return .init(statusCode: statusCode) diff --git a/Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore_FF_MultipleContentTypes/Server.swift b/Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore_FF_MultipleContentTypes/Server.swift index 1dd4e61c4..0e80ade0f 100644 --- a/Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore_FF_MultipleContentTypes/Server.swift +++ b/Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore_FF_MultipleContentTypes/Server.swift @@ -125,7 +125,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .ok(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 200) + var response = Response(statusCode: 200) suppressMutabilityWarning(&response) try converter.setHeaderFieldAsText( in: &response.headerFields, @@ -152,7 +152,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { return response case let .`default`(statusCode, value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: statusCode) + var response = Response(statusCode: statusCode) suppressMutabilityWarning(&response) switch value.body { case let .json(value): @@ -219,7 +219,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .created(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 201) + var response = Response(statusCode: 201) suppressMutabilityWarning(&response) try converter.setHeaderFieldAsJSON( in: &response.headerFields, @@ -241,7 +241,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { return response case let .badRequest(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 400) + var response = Response(statusCode: 400) suppressMutabilityWarning(&response) try converter.setHeaderFieldAsText( in: &response.headerFields, @@ -290,7 +290,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .ok(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 200) + var response = Response(statusCode: 200) suppressMutabilityWarning(&response) switch value.body { case let .json(value): @@ -388,7 +388,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .accepted(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 202) + var response = Response(statusCode: 202) suppressMutabilityWarning(&response) return response case let .undocumented(statusCode, _): return .init(statusCode: statusCode) @@ -422,7 +422,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .noContent(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 204) + var response = Response(statusCode: 204) suppressMutabilityWarning(&response) return response case let .undocumented(statusCode, _): return .init(statusCode: statusCode) @@ -479,12 +479,12 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .noContent(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 204) + var response = Response(statusCode: 204) suppressMutabilityWarning(&response) return response case let .badRequest(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 400) + var response = Response(statusCode: 400) suppressMutabilityWarning(&response) switch value.body { case let .json(value): @@ -555,7 +555,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { switch output { case let .ok(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 200) + var response = Response(statusCode: 200) suppressMutabilityWarning(&response) switch value.body { case let .binary(value): @@ -572,7 +572,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { return response case let .preconditionFailed(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 412) + var response = Response(statusCode: 412) suppressMutabilityWarning(&response) switch value.body { case let .json(value): @@ -589,7 +589,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol { return response case let .internalServerError(value): suppressUnusedWarning(value) - var response: Response = .init(statusCode: 500) + var response = Response(statusCode: 500) suppressMutabilityWarning(&response) switch value.body { case let .text(value):