Skip to content

Commit 47232ac

Browse files
committed
Update documentation
1 parent 96cecd6 commit 47232ac

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Sources/ComposableArchitecturePattern/ServerAPIError.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77

88
import Foundation
99

10+
/// An error encountered during server operation.
1011
public enum ServerAPIError: Error {
1112
/// The API request is bad.
1213
case badRequest(description: String? = nil, error: Error? = nil)
1314
/// The API unexpectedly returned empty data.
1415
case emptyData(description: String? = nil)
1516
/// The wrong data returned in response.
1617
case incorrectReponseData(description: String? = nil)
18+
/// A local error.
1719
case local(description: String? = nil, error: Error? = nil)
1820
/// An error occurred with the network.
1921
case network(description: String? = nil)

Sources/ComposableArchitecturePattern/ServerEnvironment.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77

88
import Foundation
99

10+
/// A server environment with url path.
1011
public enum ServerEnvironment: Hashable, CustomStringConvertible {
12+
/// A development environment.
1113
case development(url: String)
14+
/// A local environment.
1215
case local(url: String)
16+
/// A production environment.
1317
case production(url: String)
18+
/// A test environment.
1419
case test(url: String)
1520

1621
public var description: String {
@@ -23,6 +28,7 @@ public enum ServerEnvironment: Hashable, CustomStringConvertible {
2328
}
2429
}
2530

31+
/// A url from the environment path.
2632
public var url: URL? {
2733
switch self {
2834
case let .development(url),

0 commit comments

Comments
 (0)