From 81b34d310077587ccfdea1a29226a2e32936ecfb Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@gmail.com> Date: Wed, 2 Oct 2024 11:04:21 +0100 Subject: [PATCH] [swift5] rename unknownDefault to unknownDefaultOpenApi to match the enums unknown case --- .../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}}"))