From 289390c06c5d716a319b7236ec45ff81f5098f47 Mon Sep 17 00:00:00 2001 From: Mihail Verenich <97mik@mail.ru> Date: Thu, 26 Feb 2026 14:55:33 +0300 Subject: [PATCH 1/2] fix(swift): disable use of group separator --- .../src/main/resources/swift5/Extensions.mustache | 1 + .../src/main/resources/swift6/Extensions.mustache | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache index 92d0d1f95af7..7a93772f33d3 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache @@ -159,6 +159,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/modules/openapi-generator/src/main/resources/swift6/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift6/Extensions.mustache index 0a3670cca2c2..7145643cddc4 100644 --- a/modules/openapi-generator/src/main/resources/swift6/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/Extensions.mustache @@ -149,6 +149,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } From 2ef6935363acf2fc4b6a1b86972443ddf3efe99e Mon Sep 17 00:00:00 2001 From: Mihail Verenich <97mik@mail.ru> Date: Sat, 28 Feb 2026 23:21:32 +0300 Subject: [PATCH 2/2] update swift samples --- .../PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../default/PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../urlsessionLibrary/Sources/PetstoreClient/Extensions.swift | 1 + .../validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift | 1 + .../swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift | 1 + .../Sources/PetstoreClient/Infrastructure/Extensions.swift | 1 + .../Sources/PetstoreClient/Infrastructure/Extensions.swift | 1 + .../Sources/PetstoreClient/Infrastructure/Extensions.swift | 1 + .../Classes/OpenAPIs/Infrastructure/Extensions.swift | 1 + .../Sources/CombineLibrary/Infrastructure/Extensions.swift | 1 + .../Sources/PetstoreClient/Infrastructure/Extensions.swift | 1 + .../Sources/PetstoreClient/Infrastructure/Extensions.swift | 1 + .../Classes/OpenAPIs/Infrastructure/Extensions.swift | 1 + .../Classes/OpenAPIs/Infrastructure/Extensions.swift | 1 + .../Classes/OpenAPIs/Infrastructure/Extensions.swift | 1 + .../Sources/PetstoreClient/Infrastructure/Extensions.swift | 1 + .../Classes/OpenAPIs/Infrastructure/Extensions.swift | 1 + .../Sources/PetstoreClient/Infrastructure/Extensions.swift | 1 + 24 files changed, 24 insertions(+) diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 286c5001ff84..2082fb065ea4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 286c5001ff84..2082fb065ea4 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 286c5001ff84..2082fb065ea4 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 286c5001ff84..2082fb065ea4 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 286c5001ff84..2082fb065ea4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 286c5001ff84..2082fb065ea4 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index c90549a49655..c6b80d8ea434 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -158,6 +158,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 5ffd8f3a2fb7..315305c59957 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift index 286c5001ff84..2082fb065ea4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 286c5001ff84..2082fb065ea4 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift index d846f3e2b36c..5d754dea06cc 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift @@ -63,6 +63,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Extensions.swift index 2b6269d34a6b..6d16fb80f88e 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Extensions.swift @@ -148,6 +148,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift index 2b6269d34a6b..6d16fb80f88e 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift @@ -148,6 +148,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift index 83bf06577d98..b652c8fff994 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift index 68e48268d1b7..31258876af84 100644 --- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Extensions.swift @@ -147,6 +147,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) } diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift index fe7303e5afc6..f5c0fa4a9b2e 100644 --- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift +++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Extensions.swift @@ -60,6 +60,7 @@ extension KeyedEncodingContainerProtocol { let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal numberFormatter.locale = Locale(identifier: "en_US") + numberFormatter.usesGroupingSeparator = false let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)" try encode(formattedString, forKey: key) }