From 90bc1000bd390211fe9a364f64b5b973e28da7ed Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:45:49 +0100 Subject: [PATCH] [swift5] rename unknownDefault to unknownDefaultOpenApi to match the enums unknown case (#19753) --- .../src/main/resources/swift5/modelOneOf.mustache | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift5/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/swift5/modelOneOf.mustache index ced59ca6e03a..312cda2f1ccd 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelOneOf.mustache @@ -3,7 +3,7 @@ case type{{.}}({{.}}) {{/oneOf}} {{#oneOfUnknownDefaultCase}} - case unknownDefault + case unknownDefaultOpenApi {{/oneOfUnknownDefaultCase}} public func encode(to encoder: Encoder) throws { @@ -14,7 +14,7 @@ try container.encode(value) {{/oneOf}} {{#oneOfUnknownDefaultCase}} - case unknownDefault(let type): + case unknownDefaultOpenApi(let type): try container.encodeNil() {{/oneOfUnknownDefaultCase}} } @@ -33,7 +33,7 @@ {{/oneOf}} } else { {{#oneOfUnknownDefaultCase}} - self = .unknownDefault + self = .unknownDefaultOpenApi {{/oneOfUnknownDefaultCase}} {{^oneOfUnknownDefaultCase}} throw DecodingError.typeMismatch(Self.Type.self, .init(codingPath: decoder.codingPath, debugDescription: "Unable to decode instance of {{classname}}"))