Skip to content

Commit 94b0efa

Browse files
committed
[chore] swift format
1 parent 4d3a7a2 commit 94b0efa

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

Package.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ let package = Package(
113113
dependencies: [
114114
"_OpenAPIGeneratorCore",
115115
// Everything except windows: https://github.com/swiftlang/swift-package-manager/issues/6367
116-
.target(name: "swift-openapi-generator", condition: .when(platforms: [.android, .linux, .macOS, .openbsd, .wasi, .custom("freebsd")])),
117-
.product(name: "ArgumentParser", package: "swift-argument-parser"),
116+
.target(
117+
name: "swift-openapi-generator",
118+
condition: .when(platforms: [.android, .linux, .macOS, .openbsd, .wasi, .custom("freebsd")])
119+
), .product(name: "ArgumentParser", package: "swift-argument-parser"),
118120
],
119121
resources: [.copy("Resources")],
120122
swiftSettings: swiftSettings
@@ -162,5 +164,4 @@ for target in package.targets {
162164
case .macro, .plugin, .system, .binary: () // not applicable
163165
@unknown default: () // we don't know what to do here, do nothing
164166
}
165-
}
166-
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
167+
}// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

Sources/_OpenAPIGeneratorCore/Parser/YamsParser.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,14 @@ public struct YamsParser: ParserProtocol {
8080
case "3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4":
8181
let openAPI30Document = try decoder.decode(OpenAPIKit30.OpenAPI.Document.self, from: input.contents)
8282
document = openAPI30Document.convert(to: .v3_1_0)
83-
case "3.1.0", "3.1.1", "3.1.2": document = try decoder.decode(OpenAPIKit.OpenAPI.Document.self, from: input.contents)
84-
case "3.2.0": document = try decoder.decode(OpenAPIKit.OpenAPI.Document.self, from: input.contents, userInfo: decodingOptions)
83+
case "3.1.0", "3.1.1", "3.1.2":
84+
document = try decoder.decode(OpenAPIKit.OpenAPI.Document.self, from: input.contents)
85+
case "3.2.0":
86+
document = try decoder.decode(
87+
OpenAPIKit.OpenAPI.Document.self,
88+
from: input.contents,
89+
userInfo: decodingOptions
90+
)
8591
default:
8692
throw Diagnostic.openAPIVersionError(
8793
versionString: "openapi: \(openAPIVersion)",

0 commit comments

Comments
 (0)