Skip to content

Full compatibility with the "ExistentialAny" upcoming feature #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
// swift-tools-version: 5.8

//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift OpenAPI Vapor open source project
//
// Copyright (c) 2023 the Swift OpenAPI Vapor project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Swift OpenAPI Vapor project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import PackageDescription

// General Swift-settings for all targets.
let swiftSettings: [SwiftSetting] = [
// https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md
// Require `any` for existential types.
.enableUpcomingFeature("ExistentialAny")
]

let package = Package(
name: "swift-openapi-vapor",
platforms: [
Expand All @@ -23,14 +42,16 @@ let package = Package(
dependencies: [
.product(name: "Vapor", package: "vapor"),
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime")
]
],
swiftSettings: swiftSettings
),
.testTarget(
name: "OpenAPIVaporTests",
dependencies: [
"OpenAPIVapor",
.product(name: "XCTVapor", package: "vapor")
]
],
swiftSettings: swiftSettings
)
]
)
4 changes: 2 additions & 2 deletions Sources/OpenAPIVapor/VaporTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import NIOFoundationCompat
public final class VaporTransport {

/// A routes builder with which to register request handlers.
internal var routesBuilder: Vapor.RoutesBuilder
internal var routesBuilder: any Vapor.RoutesBuilder

/// Creates a new transport.
/// - Parameter routesBuilder: A routes builder with which to register request handlers.
public init(routesBuilder: Vapor.RoutesBuilder) {
public init(routesBuilder: any Vapor.RoutesBuilder) {
self.routesBuilder = routesBuilder
}
}
Expand Down