Skip to content

Commit dedd2fc

Browse files
authored
fix(swift): disable use of group separator (#23062)
* fix(swift): disable use of group separator * update swift samples
1 parent d9dd07a commit dedd2fc

File tree

26 files changed

+26
-0
lines changed

26 files changed

+26
-0
lines changed

modules/openapi-generator/src/main/resources/swift5/Extensions.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ extension KeyedEncodingContainerProtocol {
159159
let numberFormatter = NumberFormatter()
160160
numberFormatter.numberStyle = .decimal
161161
numberFormatter.locale = Locale(identifier: "en_US")
162+
numberFormatter.usesGroupingSeparator = false
162163
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
163164
try encode(formattedString, forKey: key)
164165
}

modules/openapi-generator/src/main/resources/swift6/Extensions.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ extension KeyedEncodingContainerProtocol {
149149
let numberFormatter = NumberFormatter()
150150
numberFormatter.numberStyle = .decimal
151151
numberFormatter.locale = Locale(identifier: "en_US")
152+
numberFormatter.usesGroupingSeparator = false
152153
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
153154
try encode(formattedString, forKey: key)
154155
}

samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol {
157157
let numberFormatter = NumberFormatter()
158158
numberFormatter.numberStyle = .decimal
159159
numberFormatter.locale = Locale(identifier: "en_US")
160+
numberFormatter.usesGroupingSeparator = false
160161
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
161162
try encode(formattedString, forKey: key)
162163
}

samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol {
157157
let numberFormatter = NumberFormatter()
158158
numberFormatter.numberStyle = .decimal
159159
numberFormatter.locale = Locale(identifier: "en_US")
160+
numberFormatter.usesGroupingSeparator = false
160161
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
161162
try encode(formattedString, forKey: key)
162163
}

samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol {
157157
let numberFormatter = NumberFormatter()
158158
numberFormatter.numberStyle = .decimal
159159
numberFormatter.locale = Locale(identifier: "en_US")
160+
numberFormatter.usesGroupingSeparator = false
160161
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
161162
try encode(formattedString, forKey: key)
162163
}

samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol {
157157
let numberFormatter = NumberFormatter()
158158
numberFormatter.numberStyle = .decimal
159159
numberFormatter.locale = Locale(identifier: "en_US")
160+
numberFormatter.usesGroupingSeparator = false
160161
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
161162
try encode(formattedString, forKey: key)
162163
}

samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol {
157157
let numberFormatter = NumberFormatter()
158158
numberFormatter.numberStyle = .decimal
159159
numberFormatter.locale = Locale(identifier: "en_US")
160+
numberFormatter.usesGroupingSeparator = false
160161
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
161162
try encode(formattedString, forKey: key)
162163
}

samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol {
157157
let numberFormatter = NumberFormatter()
158158
numberFormatter.numberStyle = .decimal
159159
numberFormatter.locale = Locale(identifier: "en_US")
160+
numberFormatter.usesGroupingSeparator = false
160161
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
161162
try encode(formattedString, forKey: key)
162163
}

samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ extension KeyedEncodingContainerProtocol {
158158
let numberFormatter = NumberFormatter()
159159
numberFormatter.numberStyle = .decimal
160160
numberFormatter.locale = Locale(identifier: "en_US")
161+
numberFormatter.usesGroupingSeparator = false
161162
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
162163
try encode(formattedString, forKey: key)
163164
}

samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extension KeyedEncodingContainerProtocol {
157157
let numberFormatter = NumberFormatter()
158158
numberFormatter.numberStyle = .decimal
159159
numberFormatter.locale = Locale(identifier: "en_US")
160+
numberFormatter.usesGroupingSeparator = false
160161
let formattedString = numberFormatter.string(from: decimalNumber) ?? "\(value)"
161162
try encode(formattedString, forKey: key)
162163
}

0 commit comments

Comments
 (0)