Skip to content

Commit c62d6bd

Browse files
Update tutorials and tests to reference new type-safe variables API
1 parent 7156e50 commit c62d6bd

20 files changed

+26
-23
lines changed

Sources/swift-openapi-generator/Documentation.docc/Tutorials/ClientSwiftPM.tutorial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
@Step {
123123
Next we'll create an instance of our client.
124124

125-
Note: `Servers.server2()` is the localhost service, defined in the OpenAPI document.
125+
Note: `Servers.Server2.url()` is the localhost service, defined in the OpenAPI document.
126126
@Code(name: "main.swift", file: client.main.2.swift)
127127
}
128128
@Step {

Sources/swift-openapi-generator/Documentation.docc/Tutorials/ClientXcode.tutorial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
@Step {
120120
Next we'll create an instance of the generated client.
121121

122-
Note: `Servers.server2()` is the localhost service, defined in the OpenAPI document.
122+
Note: `Servers.Server2.url()` is the localhost service, defined in the OpenAPI document.
123123

124124
@Code(name: "GreetingClient.swift", file: client.xcode.2.swift)
125125
}

Sources/swift-openapi-generator/Documentation.docc/Tutorials/_Resources/client.main.2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import OpenAPIRuntime
22
import OpenAPIURLSession
33

44
let client = Client(
5-
serverURL: try Servers.server2(),
5+
serverURL: try Servers.Server2.url(),
66
transport: URLSessionTransport()
77
)

Sources/swift-openapi-generator/Documentation.docc/Tutorials/_Resources/client.main.3.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import OpenAPIRuntime
22
import OpenAPIURLSession
33

44
let client = Client(
5-
serverURL: try Servers.server2(),
5+
serverURL: try Servers.Server2.url(),
66
transport: URLSessionTransport()
77
)
88

Sources/swift-openapi-generator/Documentation.docc/Tutorials/_Resources/client.main.4.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import OpenAPIRuntime
22
import OpenAPIURLSession
33

44
let client = Client(
5-
serverURL: try Servers.server2(),
5+
serverURL: try Servers.Server2.url(),
66
transport: URLSessionTransport()
77
)
88

Sources/swift-openapi-generator/Documentation.docc/Tutorials/_Resources/client.main.5.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import OpenAPIRuntime
22
import OpenAPIURLSession
33

44
let client = Client(
5-
serverURL: try Servers.server2(),
5+
serverURL: try Servers.Server2.url(),
66
transport: URLSessionTransport()
77
)
88

Sources/swift-openapi-generator/Documentation.docc/Tutorials/_Resources/client.main.6.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import OpenAPIRuntime
22
import OpenAPIURLSession
33

44
let client = Client(
5-
serverURL: try Servers.server2(),
5+
serverURL: try Servers.Server2.url(),
66
transport: URLSessionTransport()
77
)
88

Sources/swift-openapi-generator/Documentation.docc/Tutorials/_Resources/client.main.7.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import OpenAPIRuntime
22
import OpenAPIURLSession
33

44
let client = Client(
5-
serverURL: try Servers.server2(),
5+
serverURL: try Servers.Server2.url(),
66
transport: URLSessionTransport()
77
)
88

Sources/swift-openapi-generator/Documentation.docc/Tutorials/_Resources/client.xcode.2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public struct GreetingClient {
66

77
public func getGreeting(name: String?) async throws -> String {
88
let client = Client(
9-
serverURL: try Servers.server2(),
9+
serverURL: try Servers.Server2.url(),
1010
transport: URLSessionTransport()
1111
)
1212
}

Sources/swift-openapi-generator/Documentation.docc/Tutorials/_Resources/client.xcode.3.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public struct GreetingClient {
66

77
public func getGreeting(name: String?) async throws -> String {
88
let client = Client(
9-
serverURL: try Servers.server2(),
9+
serverURL: try Servers.Server2.url(),
1010
transport: URLSessionTransport()
1111
)
1212
let response = try await client.getGreeting(query: .init(name: name))

0 commit comments

Comments
 (0)