mirror of
https://github.com/swift-server/swift-openapi-async-http-client.git
synced 2026-05-03 07:42:29 +00:00
Move to FoundationEssentials (#59)
Uses `FoundationEssentials` instead of `Foundation`. Also removes `NIOFoundationCompat`, because it did appear to be used, and that pulled in the entire Foundation. Also disabled the default traits for the `OpenAPIRuntime` to prevent linking Foundation.
This commit is contained in:
@@ -15,15 +15,14 @@ import OpenAPIRuntime
|
||||
import AsyncHTTPClient
|
||||
import NIOCore
|
||||
import NIOHTTP1
|
||||
import NIOFoundationCompat
|
||||
import HTTPTypes
|
||||
#if canImport(Darwin)
|
||||
import Foundation
|
||||
#if canImport(FoundationEssentials)
|
||||
@preconcurrency import struct FoundationEssentials.URL
|
||||
import struct FoundationEssentials.URLComponents
|
||||
import struct FoundationEssentials.Data
|
||||
import protocol FoundationEssentials.LocalizedError
|
||||
#else
|
||||
@preconcurrency import struct Foundation.URL
|
||||
import struct Foundation.URLComponents
|
||||
import struct Foundation.Data
|
||||
import protocol Foundation.LocalizedError
|
||||
import Foundation
|
||||
#endif
|
||||
|
||||
/// A client transport that performs HTTP operations using the HTTPClient type
|
||||
|
||||
Reference in New Issue
Block a user