diff --git a/.github/workflows/samples-swift.yaml b/.github/workflows/samples-swift.yaml new file mode 100644 index 00000000000..5e6dbf899b2 --- /dev/null +++ b/.github/workflows/samples-swift.yaml @@ -0,0 +1,50 @@ +name: Samples Swift + +on: + push: + paths: + - samples/client/petstore/swift5/** + pull_request: + paths: + - samples/client/petstore/swift5/** + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [macos-latest] + sample: + - samples/client/petstore/swift5/alamofireLibrary + - samples/client/petstore/swift5/anycodableLibrary + - samples/client/petstore/swift5/asyncAwaitLibrary + - samples/client/petstore/swift5/combineLibrary + - samples/client/petstore/swift5/default + - samples/client/petstore/swift5/deprecated + - samples/client/petstore/swift5/frozenEnums + - samples/client/petstore/swift5/nonPublicApi + - samples/client/petstore/swift5/objcCompatible + - samples/client/petstore/swift5/oneOf + - samples/client/petstore/swift5/promisekitLibrary + - samples/client/petstore/swift5/readonlyProperties + - samples/client/petstore/swift5/resultLibrary + - samples/client/petstore/swift5/rxswiftLibrary + - samples/client/petstore/swift5/urlsessionLibrary + - samples/client/petstore/swift5/validation + # NOTE: disabled as vaporLibrary doesnt build when adding this CI config + #- samples/client/petstore/swift5/vaporLibrary + - samples/client/petstore/swift5/x-swift-hashable + include: + - os: ubuntu-latest + sample: samples/client/petstore/swift5/alamofireLibrary + name: Build Swift samples + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: swift-actions/setup-swift@v1 + if: ${{ matrix.os == 'ubuntu-latest' }} + with: + swift-version: '5' + - name: Build + working-directory: ${{ matrix.sample }} + run: swift build \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache index a2452ecc648..e670d7d5c8c 100644 --- a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache @@ -4,7 +4,10 @@ // https://openapi-generator.tech // -import Foundation{{#useVapor}} +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif{{#useVapor}} import Vapor {{/useVapor}} diff --git a/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache index 2f4d0516c71..db77b5e6847 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache @@ -1,4 +1,4 @@ github "Flight-School/AnyCodable" ~> 0.6{{#useAlamofire}} -github "Alamofire/Alamofire" ~> 5.4{{/useAlamofire}}{{#usePromiseKit}} +github "Alamofire/Alamofire" ~> 5.7{{/useAlamofire}}{{#usePromiseKit}} github "mxcl/PromiseKit" ~> 6.15{{/usePromiseKit}}{{#useRxSwift}} github "ReactiveX/RxSwift" ~> 6.2{{/useRxSwift}} diff --git a/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache b/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache index 9cf0a88b29b..dfc46654921 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache @@ -4,7 +4,10 @@ // https://openapi-generator.tech // -import Foundation{{#useVapor}} +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif{{#useVapor}} import Vapor{{/useVapor}}{{#useAlamofire}} import Alamofire{{/useAlamofire}} diff --git a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache index f41fc8827eb..6d59f14e753 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif{{#usePromiseKit}} diff --git a/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache b/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache index e227058129b..bfc766127af 100644 --- a/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct JSONDataEncoding { diff --git a/modules/openapi-generator/src/main/resources/swift5/Models.mustache b/modules/openapi-generator/src/main/resources/swift5/Models.mustache index abab906fea8..12ad6044cef 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Models.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Models.mustache @@ -4,7 +4,10 @@ // https://openapi-generator.tech // -import Foundation{{#useAlamofire}} +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif{{#useAlamofire}} import Alamofire{{/useAlamofire}} protocol JSONEncodable { diff --git a/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache index 51b38d82cc9..7a261f930c6 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache @@ -26,7 +26,7 @@ let package = Package( // Dependencies declare other packages that this package depends on. .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), {{#useAlamofire}} - .package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.4.3")), + .package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.7.0")), {{/useAlamofire}} {{#usePromiseKit}} .package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "6.15.3")), diff --git a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache index 6ed32a13729..4fd2bbe3fa0 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache @@ -28,7 +28,7 @@ Pod::Spec.new do |s| s.source_files = '{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift' s.dependency 'AnyCodable-FlightSchool', '~> 0.6' {{#useAlamofire}} - s.dependency 'Alamofire', '~> 5.4' + s.dependency 'Alamofire', '~> 5.7' {{/useAlamofire}} {{#usePromiseKit}} s.dependency 'PromiseKit/CorePromise', '~> 6.15' diff --git a/samples/client/petstore/swift5/alamofireLibrary/Cartfile b/samples/client/petstore/swift5/alamofireLibrary/Cartfile index 1850ee6f7d1..ed537138d8c 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/Cartfile +++ b/samples/client/petstore/swift5/alamofireLibrary/Cartfile @@ -1,2 +1,2 @@ github "Flight-School/AnyCodable" ~> 0.6 -github "Alamofire/Alamofire" ~> 5.4 +github "Alamofire/Alamofire" ~> 5.7 diff --git a/samples/client/petstore/swift5/alamofireLibrary/Package.resolved b/samples/client/petstore/swift5/alamofireLibrary/Package.resolved index f5f68af36fd..5bcaaa362e5 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/Package.resolved +++ b/samples/client/petstore/swift5/alamofireLibrary/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/Alamofire/Alamofire", "state": { "branch": null, - "revision": "8dd85aee02e39dd280c75eef88ffdb86eed4b07b", - "version": "5.6.2" + "revision": "bc268c28fb170f494de9e9927c371b8342979ece", + "version": "5.7.1" } }, { @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/Flight-School/AnyCodable", "state": { "branch": null, - "revision": "56901f2af3625b38924d488b612e95fe8846ee9b", - "version": "0.6.6" + "revision": "862808b2070cd908cb04f9aafe7de83d35f81b05", + "version": "0.6.7" } } ] diff --git a/samples/client/petstore/swift5/alamofireLibrary/Package.swift b/samples/client/petstore/swift5/alamofireLibrary/Package.swift index 4c49284a6d3..727cbee509e 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/Package.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/Package.swift @@ -20,7 +20,7 @@ let package = Package( dependencies: [ // Dependencies declare other packages that this package depends on. .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), - .package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.4.3")), + .package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.7.0")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec index 2fda3d0cbbe..c93efa5445b 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec @@ -12,5 +12,5 @@ Pod::Spec.new do |s| s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' s.dependency 'AnyCodable-FlightSchool', '~> 0.6' - s.dependency 'Alamofire', '~> 5.4' + s.dependency 'Alamofire', '~> 5.7' end diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 156474f8338..5c231fce667 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index ce145c1cc7a..50c6473a628 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif import Alamofire open class Configuration { diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index 2613cc53b27..97195d9f772 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif import Alamofire protocol JSONEncodable { diff --git a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 30b466c25a1..dfe73eb99ac 100644 --- a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://localhost" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 24357d9e8c4..b9d23cc0fda 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index b49cf8d1222..5e514423a29 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift index fec54e5fd17..2c0cb652866 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift index e5c24833f23..5f9e2d9dfb9 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif internal class PetstoreClientAPI { internal static var basePath = "http://petstore.swagger.io:80/v2" internal static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 177ae20897d..08d9aeabbc6 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif internal class Configuration { diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 7ef7b95cf6d..49859f31415 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index 6b69f3b1bd5..ad2d3e175a7 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif internal struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift index 6831ade504c..29526e9819b 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs.swift index 30b466c25a1..dfe73eb99ac 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://localhost" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 61ed735ad64..807343fdb56 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 390e7060d66..a2925ee27bd 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Configuration.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Configuration.swift index 6763bc37a1c..57961bbcb34 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Configuration.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif @available(*, deprecated, renamed: "PetstoreClientAPI.Configuration") public typealias Configuration = PetstoreClientAPI.Configuration diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/JSONDataEncoding.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/APIs.swift index 30b466c25a1..dfe73eb99ac 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://localhost" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs.swift index a1f97136a58..763128319c3 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif import Vapor open class PetstoreClientAPI { diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Configuration.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Configuration.swift index db8707ad7a7..5edd9b40932 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Configuration.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif import Vapor open class Configuration { diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift index b1777b8b35e..f926a897a94 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5f4f3c790ab..67757f368a9 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var customHeaders: [String: String] = [:] diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Configuration.swift index df53ee09010..0457d990c23 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif open class Configuration { diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift index d12fa0fb513..ac04dba5fbb 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif #if canImport(AnyCodable) import AnyCodable #endif diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64d..cb3121a4f63 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -6,6 +6,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif public struct JSONDataEncoding { diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models.swift index b73c2b8fde0..7807480bfcf 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -5,6 +5,9 @@ // import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif protocol JSONEncodable { func encodeToJSON() -> Any