Skip to content

Commit 7e08c66

Browse files
authored
Enable streaming bodies (#8)
* Enable streaming bodies * require the required vapor version for proper streaming support
1 parent 6530fe9 commit 7e08c66

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let package = Package(
1515
],
1616
dependencies: [
1717
.package(url: "https://github.com/apple/swift-openapi-runtime.git", .upToNextMinor(from: "0.3.0")),
18-
.package(url: "https://github.com/vapor/vapor.git", from: "4.84.4"),
18+
.package(url: "https://github.com/vapor/vapor.git", from: "4.86.2"),
1919
.package(url: "https://github.com/apple/swift-atomics", from: "1.2.0")
2020
],
2121
targets: [

Sources/OpenAPIVapor/VaporTransport.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ extension VaporTransport: ServerTransport {
4141
) throws {
4242
self.routesBuilder.on(
4343
HTTPMethod(method),
44-
[PathComponent](path)
44+
[PathComponent](path),
45+
body: .stream
4546
) { vaporRequest in
4647
let request = try HTTPTypes.HTTPRequest(vaporRequest)
4748
let body = OpenAPIRuntime.HTTPBody(vaporRequest)

0 commit comments

Comments
 (0)