Skip to content

Commit 047b82f

Browse files
committed
update for breaking changes in OpenAPIKit
1 parent 0b31014 commit 047b82f

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/AppAPIDocumentation/VaporRoute+OpenAPI.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,10 @@ extension Vapor.PathComponent {
208208
return .init(
209209
name: name,
210210
parameterLocation: .path,
211-
schemaOrContent: .schema(reference: .internal(.node(.init(type: \.schemas, selector: "path_\(name)"))))
211+
schema: .init(
212+
schemaReference: .internal(.node(\.schemas, named: "path_\(name)")),
213+
style: .default(for: .path)
214+
)
212215
)
213216
default:
214217
return nil

Sources/AppAPIDocumentation/VaporRoutes+OpenAPI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ extension Vapor.Routes {
5050
}
5151
}
5252

53-
return OpenAPI.PathItem.operations(
54-
.init(
53+
return .init(
54+
OpenAPI.PathItem(
5555
get: get,
5656
put: put,
5757
post: post,

Sources/SwiftGen/ApiTestPackageSwiftGen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ public func produceAPITestPackage(for pathItems: OpenAPI.PathItem.Map,
9292
fullyQualifiedTestFuncNames: [String]
9393
)]
9494
results = HttpVerb.allCases.flatMap { httpVerb in
95-
return pathItems.compactMap { (path, pathItem) in
96-
guard case let .operations(operations) = pathItem else {
95+
return pathItems.compactMap { (path, pathItemOrReference) in
96+
guard case let .b(pathItem) = pathItemOrReference else {
9797
return nil
9898
}
9999

100-
guard let operation = operations.for(httpVerb) else {
100+
guard let operation = pathItem.for(httpVerb) else {
101101
return nil
102102
}
103103

0 commit comments

Comments
 (0)