diff --git a/Sources/Configuration/KeyCoders/ConfigKeyEncoder.swift b/Sources/Configuration/KeyCoders/ConfigKeyEncoder.swift index 02f1e2d..0b771b7 100644 --- a/Sources/Configuration/KeyCoders/ConfigKeyEncoder.swift +++ b/Sources/Configuration/KeyCoders/ConfigKeyEncoder.swift @@ -50,7 +50,7 @@ internal protocol ConfigKeyEncoder: Sendable { /// /// ```swift /// let encoder = SeparatorKeyEncoder(separator: ".") - /// let key = AbsoluteConfigKey(components: ["database", "host"], context: context) + /// let key = AbsoluteConfigKey(["database", "host"], context: context) /// let encoded = encoder.encode(key) /// // Results in "database.host" /// ``` diff --git a/Sources/Configuration/KeyCoders/SeparatorKeyEncoder.swift b/Sources/Configuration/KeyCoders/SeparatorKeyEncoder.swift index 984148e..807fb11 100644 --- a/Sources/Configuration/KeyCoders/SeparatorKeyEncoder.swift +++ b/Sources/Configuration/KeyCoders/SeparatorKeyEncoder.swift @@ -25,7 +25,7 @@ /// /// ```swift /// let encoder = SeparatorKeyEncoder(separator: ".") -/// let key = AbsoluteConfigKey(components: ["database", "host", "port"], context: context) +/// let key = AbsoluteConfigKey(["database", "host", "port"], context: context) /// let encoded = encoder.encode(key) /// // Results in "database.host.port" /// ``` @@ -64,7 +64,7 @@ extension ConfigKeyEncoder where Self == SeparatorKeyEncoder { /// /// ```swift /// let encoder = ConfigKeyEncoder.dotSeparated - /// let key = AbsoluteConfigKey(components: ["app", "database", "host"], context: context) + /// let key = AbsoluteConfigKey(["app", "database", "host"], context: context) /// let encoded = encoder.encode(key) /// // Results in "app.database.host" /// ``` @@ -79,7 +79,7 @@ extension ConfigKeyEncoder where Self == SeparatorKeyEncoder { /// /// ```swift /// let encoder = ConfigKeyEncoder.dashSeparated - /// let key = AbsoluteConfigKey(components: ["app", "database", "host"], context: context) + /// let key = AbsoluteConfigKey(["app", "database", "host"], context: context) /// let encoded = encoder.encode(key) /// // Results in "app-database-host" /// ``` diff --git a/Sources/Configuration/Providers/EnvironmentVariables/EnvironmentKeyEncoder.swift b/Sources/Configuration/Providers/EnvironmentVariables/EnvironmentKeyEncoder.swift index 17a9839..9bcebc3 100644 --- a/Sources/Configuration/Providers/EnvironmentVariables/EnvironmentKeyEncoder.swift +++ b/Sources/Configuration/Providers/EnvironmentVariables/EnvironmentKeyEncoder.swift @@ -38,15 +38,15 @@ import Foundation /// let encoder = EnvironmentKeyEncoder() /// /// // Basic hierarchical key -/// let key1 = AbsoluteConfigKey(components: ["http", "port"], context: context) +/// let key1 = AbsoluteConfigKey(["http", "port"], context: context) /// encoder.encode(key1) // "HTTP_PORT" /// /// // CamelCase handling -/// let key2 = AbsoluteConfigKey(components: ["http", "serverTimeout"], context: context) +/// let key2 = AbsoluteConfigKey(["http", "serverTimeout"], context: context) /// encoder.encode(key2) // "HTTP_SERVER_TIMEOUT" /// /// // Special character handling -/// let key3 = AbsoluteConfigKey(components: ["http", "user-agent"], context: context) +/// let key3 = AbsoluteConfigKey(["http", "user-agent"], context: context) /// encoder.encode(key3) // "HTTP_USER_AGENT" /// ``` /// diff --git a/Sources/Configuration/Providers/InMemory/InMemoryProvider.swift b/Sources/Configuration/Providers/InMemory/InMemoryProvider.swift index dae68d0..73b6e7a 100644 --- a/Sources/Configuration/Providers/InMemory/InMemoryProvider.swift +++ b/Sources/Configuration/Providers/InMemory/InMemoryProvider.swift @@ -92,8 +92,8 @@ public struct InMemoryProvider: Sendable { /// instances or when working with keys programmatically. /// /// ```swift - /// let key1 = AbsoluteConfigKey(components: ["database", "host"], context: [:]) - /// let key2 = AbsoluteConfigKey(components: ["database", "port"], context: [:]) + /// let key1 = AbsoluteConfigKey(["database", "host"], context: [:]) + /// let key2 = AbsoluteConfigKey(["database", "port"], context: [:]) /// /// let provider = InMemoryProvider( /// name: "database-config", diff --git a/Sources/Configuration/Providers/InMemory/MutableInMemoryProvider.swift b/Sources/Configuration/Providers/InMemory/MutableInMemoryProvider.swift index ac8dc1a..7a1a29c 100644 --- a/Sources/Configuration/Providers/InMemory/MutableInMemoryProvider.swift +++ b/Sources/Configuration/Providers/InMemory/MutableInMemoryProvider.swift @@ -108,8 +108,8 @@ public final class MutableInMemoryProvider: Sendable { /// the ``setValue(_:forKey:)`` methods. /// /// ```swift - /// let key1 = AbsoluteConfigKey(components: ["database", "host"], context: [:]) - /// let key2 = AbsoluteConfigKey(components: ["database", "port"], context: [:]) + /// let key1 = AbsoluteConfigKey(["database", "host"], context: [:]) + /// let key2 = AbsoluteConfigKey(["database", "port"], context: [:]) /// /// let provider = MutableInMemoryProvider( /// name: "dynamic-config", @@ -155,7 +155,7 @@ extension MutableInMemoryProvider { /// /// ```swift /// let provider = MutableInMemoryProvider(initialValues: [:]) - /// let key = AbsoluteConfigKey(components: ["api", "enabled"], context: [:]) + /// let key = AbsoluteConfigKey(["api", "enabled"], context: [:]) /// /// // Set a new value /// provider.setValue(true, forKey: key)