Skip to content

Commit f860998

Browse files
committed
[swift6] fix vapor build
1 parent 852a607 commit f860998

54 files changed

Lines changed: 363 additions & 251 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/client/petstore/swift6/vaporLibrary/Package.resolved

Lines changed: 143 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/petstore/swift6/vaporLibrary/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ let package = Package(
1616
],
1717
dependencies: [
1818
// Dependencies declare other packages that this package depends on.
19-
.package(url: "https://github.com/vapor/vapor", from: "4.0.0")
19+
.package(url: "https://github.com/vapor/vapor", from: "4.99.0")
2020
],
2121
targets: [
2222
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
2323
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2424
.target(
2525
name: "PetstoreClient",
26-
dependencies: ["Vapor", ],
26+
dependencies: [.product(name: "Vapor", package: "vapor")],
2727
path: "Sources/PetstoreClient"
2828
),
2929
],

samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ open class AnotherFakeAPI {
1818
- parameter body: (body) client model
1919
- returns: `EventLoopFuture` of `ClientResponse`
2020
*/
21-
open class func call123testSpecialTagsRaw(uuidTest: UUID, body: Client, headers: HTTPHeaders = PetstoreClientAPIConfiguration.shared.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<ClientResponse> {
21+
open class func call123testSpecialTagsRaw(uuidTest: UUID, body: Client, headers: HTTPHeaders = PetstoreClientAPIConfiguration.shared.customHeaders, apiConfiguration: PetstoreClientAPIConfiguration = PetstoreClientAPIConfiguration.shared, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<ClientResponse> {
2222
let localVariablePath = "/another-fake/dummy"
2323
let localVariableURLString = apiConfiguration.basePath + localVariablePath
2424

@@ -27,7 +27,7 @@ open class AnotherFakeAPI {
2727
}
2828

2929
return localVariableApiClient.send(.PATCH, headers: headers, to: URI(string: localVariableURLString)) { localVariableRequest in
30-
try Configuration.apiWrapper(&localVariableRequest)
30+
try apiConfiguration.apiWrapper(&localVariableRequest)
3131

3232
localVariableRequest.headers.add(name: "uuid_test", value: uuidTest.description)
3333

@@ -51,8 +51,8 @@ open class AnotherFakeAPI {
5151
- parameter body: (body) client model
5252
- returns: `EventLoopFuture` of `Call123testSpecialTags`
5353
*/
54-
open class func call123testSpecialTags(uuidTest: UUID, body: Client, headers: HTTPHeaders = PetstoreClientAPIConfiguration.shared.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<Call123testSpecialTags> {
55-
return call123testSpecialTagsRaw(uuidTest: uuidTest, body: body, headers: headers, beforeSend: beforeSend).flatMapThrowing { response -> Call123testSpecialTags in
54+
open class func call123testSpecialTags(uuidTest: UUID, body: Client, headers: HTTPHeaders = PetstoreClientAPIConfiguration.shared.customHeaders, apiConfiguration: PetstoreClientAPIConfiguration = PetstoreClientAPIConfiguration.shared, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<Call123testSpecialTags> {
55+
return call123testSpecialTagsRaw(uuidTest: uuidTest, body: body, headers: headers, apiConfiguration: apiConfiguration, beforeSend: beforeSend).flatMapThrowing { response -> Call123testSpecialTags in
5656
switch response.status.code {
5757
case 200:
5858
return .http200(value: try response.content.decode(Client.self, using: apiConfiguration.contentConfiguration.requireDecoder(for: Client.defaultContentType)), raw: response)

0 commit comments

Comments
 (0)