forked from loafle/openapi-generator-original
[swift][client] reduce unnecessary public api (#12975)
* [swift][client] reduce unnecessary public api * [swift][client] reduce unnecessary public api
This commit is contained in:
parent
08c4a35162
commit
c03cf178c9
@ -19,7 +19,7 @@ extension CaseIterableDefaultsLast {
|
||||
/// Initializes an enum such that if a known raw value is found, then it is decoded.
|
||||
/// Otherwise the last case is used.
|
||||
/// - Parameter decoder: A decoder.
|
||||
public init(from decoder: Decoder) throws {
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(from decoder: Decoder) throws {
|
||||
if let value = try Self(rawValue: decoder.singleValueContainer().decode(RawValue.self)) {
|
||||
self = value
|
||||
} else if let lastValue = Self.allCases.last {
|
||||
|
@ -18,7 +18,7 @@ extension CaseIterableDefaultsLast {
|
||||
/// Initializes an enum such that if a known raw value is found, then it is decoded.
|
||||
/// Otherwise the last case is used.
|
||||
/// - Parameter decoder: A decoder.
|
||||
public init(from decoder: Decoder) throws {
|
||||
internal init(from decoder: Decoder) throws {
|
||||
if let value = try Self(rawValue: decoder.singleValueContainer().decode(RawValue.self)) {
|
||||
self = value
|
||||
} else if let lastValue = Self.allCases.last {
|
||||
|
Loading…
x
Reference in New Issue
Block a user