From 24449da9a92a00ebb30f0eac7544108548e2e8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Bru=CC=88gmann?= Date: Wed, 15 Dec 2021 12:14:17 +0100 Subject: [PATCH 1/5] replace replaceSpecialCharacters in enum var names --- .../languages/Swift5ClientCodegen.java | 76 +++++++++++++------ 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 2cd6ebd8dd45..cf54709f965f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -988,18 +988,15 @@ public String toEnumVarName(String name, String datatype) { return "empty"; } - Pattern startWithNumberPattern = Pattern.compile("^\\d+"); - Matcher startWithNumberMatcher = startWithNumberPattern.matcher(name); - if (startWithNumberMatcher.find()) { - String startingNumbers = startWithNumberMatcher.group(0); - String nameWithoutStartingNumbers = name.substring(startingNumbers.length()); - - return "_" + startingNumbers + camelize(nameWithoutStartingNumbers, true); + // Reserved Name + String nameLowercase = StringUtils.lowerCase(name); + if (isReservedWord(nameLowercase)) { + return escapeReservedWord(nameLowercase); } - // for symbol, e.g. $, # - if (getSymbolName(name) != null) { - return camelize(WordUtils.capitalizeFully(getSymbolName(name).toUpperCase(Locale.ROOT)), true); + // Prefix with underscore if name starts with number + if (name.matches("\\d.*")) { + return "_" + replaceSpecialCharacters(camelize(name, true)); } // Camelize only when we have a structure defined below @@ -1009,34 +1006,67 @@ public String toEnumVarName(String name, String datatype) { camelized = true; } - // Reserved Name - String nameLowercase = StringUtils.lowerCase(name); - if (isReservedWord(nameLowercase)) { - return escapeReservedWord(nameLowercase); - } - // Check for numerical conversions if ("Int".equals(datatype) || "Int32".equals(datatype) || "Int64".equals(datatype) || "Float".equals(datatype) || "Double".equals(datatype)) { String varName = "number" + camelize(name); - varName = varName.replaceAll("-", "minus"); - varName = varName.replaceAll("\\+", "plus"); - varName = varName.replaceAll("\\.", "dot"); - return varName; + return replaceSpecialCharacters(varName); } // If we have already camelized the word, don't progress // any further if (camelized) { - return name; + return replaceSpecialCharacters(name); } char[] separators = {'-', '_', ' ', ':', '(', ')'}; - return camelize(WordUtils.capitalizeFully(StringUtils.lowerCase(name), separators) - .replaceAll("[-_ :\\(\\)]", ""), + return camelize(replaceSpecialCharacters(WordUtils.capitalizeFully(StringUtils.lowerCase(name), separators) + .replaceAll("[-_ :\\(\\)]", "")), true); } + private String replaceSpecialCharacters(String name) { + for (Map.Entry specialCharacters : specialCharReplacements.entrySet()) { + String specialChar = specialCharacters.getKey(); + String replacement = specialCharacters.getValue(); + // Underscore is the only special character we'll allow + if (!specialChar.equals("_") && name.contains(specialChar)) { + name = replaceCharacters(name, specialChar, replacement); + } + } + + // Fallback, replace unknowns with underscore. + name = name.replaceAll("\\W+", "_"); + + return name; + } + + private String replaceCharacters(String word, String oldValue, String newValue) { + if (!word.contains(oldValue)) { + return word; + } + if (word.equals(oldValue)) { + return newValue; + } + int i = word.indexOf(oldValue); + String start = word.substring(0, i); + String end = recurseOnEndOfWord(word, oldValue, newValue, i); + return start + newValue + end; + } + + private String recurseOnEndOfWord(String word, String oldValue, String newValue, int lastReplacedValue) { + String end = word.substring(lastReplacedValue + 1); + if (!end.isEmpty()) { + end = titleCase(end); + end = replaceCharacters(end, oldValue, newValue); + } + return end; + } + + private String titleCase(final String input) { + return input.substring(0, 1).toUpperCase(Locale.ROOT) + input.substring(1); + } + @Override public String toEnumName(CodegenProperty property) { String enumName = toModelName(property.name); From d9928c884e10a6d17126043fba3bf25d4de4c523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Bru=CC=88gmann?= Date: Wed, 15 Dec 2021 12:14:34 +0100 Subject: [PATCH 2/5] test special characters in enum var names --- .../codegen/swift5/Swift5ClientCodegenTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java index 8073f7065d8e..8260016ee62f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java @@ -95,6 +95,15 @@ public void testStartingWithNumber() throws Exception { Assert.assertEquals(swiftCodegen.toEnumVarName("123EntryName123", null), "_123entryName123"); } + @Test(enabled = true) + public void testSpecialCharacters() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("1:1", null), "_1Colon1"); + Assert.assertEquals(swiftCodegen.toEnumVarName("1:One", null), "_1ColonOne"); + Assert.assertEquals(swiftCodegen.toEnumVarName("Apple&Swift", null), "appleAmpersandSwift"); + Assert.assertEquals(swiftCodegen.toEnumVarName("$", null), "dollar"); + Assert.assertEquals(swiftCodegen.toEnumVarName("+1", null), "plus1"); + } + @Test(description = "returns Data when response format is binary", enabled = true) public void binaryDataTest() { // TODO update json file From 63dfd33dd309739831d4f833f29817b28bdb45fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Bru=CC=88gmann?= Date: Wed, 15 Dec 2021 13:18:57 +0100 Subject: [PATCH 3/5] ./bin/utils/export_docs_generators.sh --- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Sources/PetstoreClient/Models/EnumArrays.swift | 2 +- .../vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..755041d2e6b5 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..755041d2e6b5 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..755041d2e6b5 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..755041d2e6b5 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 321066b9f4ed..2878c15f8400 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" // This case is a catch-all generated by OpenAPI such that the enum is "non-frozen". // If new enum cases are added that are unknown to the spec/client, they are safely diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 950a66d752a7..b2caf39deea5 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable internal struct EnumArrays: Codable, Hashable { internal enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } internal enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1269cb72e27c..54180d49fc62 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable @objc public class EnumArrays: NSObject, Codable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..755041d2e6b5 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1a79ffe95b1f..2e25038bb1e0 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..755041d2e6b5 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..755041d2e6b5 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift index a796ffc79c6b..0b10063b711f 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift @@ -18,7 +18,7 @@ extension PetstoreClientAPI { public final class EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift index 0b2b8c32844a..b0d9d446d244 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift @@ -14,7 +14,7 @@ import Vapor public final class EnumArrays: Content, Hashable { public enum JustSymbol: String, Content, Hashable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Content, Hashable, CaseIterable { diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index edd583c8a292..948d727d07a1 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanOrEqualTo = ">=" + case greaterThanEqual = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { From 7b3eec2290d38ec4d375ef3d972a5b49fb5849df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Bru=CC=88gmann?= Date: Wed, 15 Dec 2021 14:26:00 +0100 Subject: [PATCH 4/5] bring back replacement check for whole string --- .../openapitools/codegen/languages/Swift5ClientCodegen.java | 5 +++++ .../openapitools/codegen/swift5/Swift5ClientCodegenTest.java | 1 + 2 files changed, 6 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index cf54709f965f..4610b7ded05f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -999,6 +999,11 @@ public String toEnumVarName(String name, String datatype) { return "_" + replaceSpecialCharacters(camelize(name, true)); } + // for symbol, e.g. $, # + if (getSymbolName(name) != null) { + return camelize(WordUtils.capitalizeFully(getSymbolName(name).toUpperCase(Locale.ROOT)), true); + } + // Camelize only when we have a structure defined below Boolean camelized = false; if (name.matches("[A-Z][a-z0-9]+[a-zA-Z0-9]*")) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java index 8260016ee62f..0f7e12737165 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java @@ -102,6 +102,7 @@ public void testSpecialCharacters() throws Exception { Assert.assertEquals(swiftCodegen.toEnumVarName("Apple&Swift", null), "appleAmpersandSwift"); Assert.assertEquals(swiftCodegen.toEnumVarName("$", null), "dollar"); Assert.assertEquals(swiftCodegen.toEnumVarName("+1", null), "plus1"); + Assert.assertEquals(swiftCodegen.toEnumVarName(">=", null), "greaterThanOrEqualTo"); } @Test(description = "returns Data when response format is binary", enabled = true) From d31cc6c60cced782be50323ef8e9d2697243b37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Bru=CC=88gmann?= Date: Wed, 15 Dec 2021 14:32:41 +0100 Subject: [PATCH 5/5] Revert "./bin/utils/export_docs_generators.sh" This reverts commit 63dfd33dd309739831d4f833f29817b28bdb45fe. --- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Sources/PetstoreClient/Models/EnumArrays.swift | 2 +- .../vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 755041d2e6b5..1d8ce99539cc 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 755041d2e6b5..1d8ce99539cc 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 755041d2e6b5..1d8ce99539cc 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 755041d2e6b5..1d8ce99539cc 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 2878c15f8400..321066b9f4ed 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" // This case is a catch-all generated by OpenAPI such that the enum is "non-frozen". // If new enum cases are added that are unknown to the spec/client, they are safely diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index b2caf39deea5..950a66d752a7 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable internal struct EnumArrays: Codable, Hashable { internal enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } internal enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 54180d49fc62..1269cb72e27c 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable @objc public class EnumArrays: NSObject, Codable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 755041d2e6b5..1d8ce99539cc 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 2e25038bb1e0..1a79ffe95b1f 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 755041d2e6b5..1d8ce99539cc 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 755041d2e6b5..1d8ce99539cc 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift index 0b10063b711f..a796ffc79c6b 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift @@ -18,7 +18,7 @@ extension PetstoreClientAPI { public final class EnumArrays: Codable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable { diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift index b0d9d446d244..0b2b8c32844a 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift @@ -14,7 +14,7 @@ import Vapor public final class EnumArrays: Content, Hashable { public enum JustSymbol: String, Content, Hashable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Content, Hashable, CaseIterable { diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 948d727d07a1..edd583c8a292 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -13,7 +13,7 @@ import AnyCodable public struct EnumArrays: Codable { public enum JustSymbol: String, Codable, CaseIterable { - case greaterThanEqual = ">=" + case greaterThanOrEqualTo = ">=" case dollar = "$" } public enum ArrayEnum: String, Codable, CaseIterable {