Skip to content

Commit 02ae849

Browse files
Relax minimum platforms to macOS 10.15, iOS 13, tvOS 13, and watchOS 6 (#18)
### Motivation Reduce deployment target by 3 versions to gain more adoption. ### Modifications - Reduced deployment targets by 3 versions - Modified `Converter#renderedRequestPath` to support iOS 13 ### Result Deployment target will be reduced by 3 versions. ### Related issues - Related to apple/swift-openapi-generator#62 ### Related PRs - Paired with apple/swift-openapi-generator#63 --------- Co-authored-by: andrewelliott <> Co-authored-by: Honza Dvorsky <[email protected]>
1 parent b7ae7af commit 02ae849

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import PackageDescription
1717
let package = Package(
1818
name: "swift-openapi-runtime",
1919
platforms: [
20-
.macOS(.v13), .iOS(.v16), .tvOS(.v16), .watchOS(.v9),
20+
.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6),
2121
],
2222
products: [
2323
.library(

Sources/OpenAPIRuntime/Conversion/Converter+Client.swift

+7-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ extension Converter {
2222
) throws -> String {
2323
var renderedString = template
2424
for parameter in parameters {
25-
renderedString.replace(
26-
"{}",
27-
with: parameter.description,
28-
maxReplacements: 1
29-
)
25+
if let range = renderedString.range(of: "{}") {
26+
renderedString = renderedString.replacingOccurrences(
27+
of: "{}",
28+
with: parameter.description,
29+
range: range
30+
)
31+
}
3032
}
3133
return renderedString
3234
}

0 commit comments

Comments
 (0)