diff --git a/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache index 4ef8c318306..ddc84910bba 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 @@ -{{#useAlamofire}}github "Alamofire/Alamofire" ~> 5.4.3{{/useAlamofire}}{{#usePromiseKit}} +github "Flight-School/AnyCodable" ~> 0.6.1{{#useAlamofire}} +github "Alamofire/Alamofire" ~> 5.4.3{{/useAlamofire}}{{#usePromiseKit}} github "mxcl/PromiseKit" ~> 6.15.3{{/usePromiseKit}}{{#useRxSwift}} github "ReactiveX/RxSwift" ~> 6.2.0{{/useRxSwift}} -github "Flight-School/AnyCodable" ~> 0.6.1 diff --git a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache index d7316c9b8c3..7f5d8b582f7 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache @@ -235,5 +235,4 @@ extension Set: RequestDecodable where Element: Content { extension Set: Content where Element: Content { } -extension AnyCodable: Content {} -{{/useVapor}} +extension AnyCodable: Content {}{{/useVapor}} 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 fe7665124f4..c84db4b5c77 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache @@ -35,15 +35,15 @@ let package = Package( {{#useAlamofire}} .package(url: "https://github.com/Alamofire/Alamofire", from: "5.4.3"), {{/useAlamofire}} - {{#useVapor}} - .package(url: "https://github.com/vapor/vapor", from: "4.0.0") - {{/useVapor}} {{#usePromiseKit}} .package(url: "https://github.com/mxcl/PromiseKit", from: "6.15.3"), {{/usePromiseKit}} {{#useRxSwift}} .package(url: "https://github.com/ReactiveX/RxSwift", from: "6.2.0"), {{/useRxSwift}} + {{#useVapor}} + .package(url: "https://github.com/vapor/vapor", from: "4.0.0") + {{/useVapor}} ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache index b07a1d50736..29bd02cefde 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache @@ -33,14 +33,14 @@ Pod::Spec.new do |s| s.documentation_url = '{{.}}' {{/podDocumentationURL}} s.source_files = '{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + {{#useAlamofire}} + s.dependency 'Alamofire', '~> 5.4.3' + {{/useAlamofire}} {{#usePromiseKit}} s.dependency 'PromiseKit/CorePromise', '~> 6.15.3' {{/usePromiseKit}} {{#useRxSwift}} s.dependency 'RxSwift', '~> 6.2.0' {{/useRxSwift}} - {{#useAlamofire}} - s.dependency 'Alamofire', '~> 5.4.3' - {{/useAlamofire}} - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' end diff --git a/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache b/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache index 49e47f72312..31f01b8bedd 100644 --- a/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache @@ -13,6 +13,6 @@ targets: scheme: {} dependencies: - carthage: AnyCodable{{#useAlamofire}} - - carthage: Alamofire{{/useAlamofire}}{{#useRxSwift}} - - carthage: RxSwift{{/useRxSwift}}{{#usePromiseKit}} - - carthage: PromiseKit{{/usePromiseKit}} + - carthage: Alamofire{{/useAlamofire}}{{#usePromiseKit}} + - carthage: PromiseKit{{/usePromiseKit}}{{#useRxSwift}} + - carthage: RxSwift{{/useRxSwift}} diff --git a/samples/client/petstore/swift5/alamofireLibrary/Cartfile b/samples/client/petstore/swift5/alamofireLibrary/Cartfile index 0346d586e3d..4fdc3a603d1 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/Cartfile +++ b/samples/client/petstore/swift5/alamofireLibrary/Cartfile @@ -1,2 +1,2 @@ -github "Alamofire/Alamofire" ~> 5.4.3 github "Flight-School/AnyCodable" ~> 0.6.1 +github "Alamofire/Alamofire" ~> 5.4.3 diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec index ec6ce348796..a93e7df2c96 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec @@ -11,6 +11,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'Alamofire', '~> 5.4.3' s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'Alamofire', '~> 5.4.3' end 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 a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/combineLibrary/Cartfile b/samples/client/petstore/swift5/combineLibrary/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/combineLibrary/Cartfile +++ b/samples/client/petstore/swift5/combineLibrary/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/default/Cartfile b/samples/client/petstore/swift5/default/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/default/Cartfile +++ b/samples/client/petstore/swift5/default/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/deprecated/Cartfile b/samples/client/petstore/swift5/deprecated/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/deprecated/Cartfile +++ b/samples/client/petstore/swift5/deprecated/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/nonPublicApi/Cartfile b/samples/client/petstore/swift5/nonPublicApi/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/nonPublicApi/Cartfile +++ b/samples/client/petstore/swift5/nonPublicApi/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 b628320a4a6..65ae1c6c642 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/objcCompatible/Cartfile b/samples/client/petstore/swift5/objcCompatible/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/objcCompatible/Cartfile +++ b/samples/client/petstore/swift5/objcCompatible/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/oneOf/Cartfile b/samples/client/petstore/swift5/oneOf/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/oneOf/Cartfile +++ b/samples/client/petstore/swift5/oneOf/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/Cartfile b/samples/client/petstore/swift5/promisekitLibrary/Cartfile index 19c497555a1..90c76690898 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/Cartfile +++ b/samples/client/petstore/swift5/promisekitLibrary/Cartfile @@ -1,3 +1,2 @@ - -github "mxcl/PromiseKit" ~> 6.15.3 github "Flight-School/AnyCodable" ~> 0.6.1 +github "mxcl/PromiseKit" ~> 6.15.3 diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec index a4bc33bd51b..b933500fe07 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec @@ -11,6 +11,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'PromiseKit/CorePromise', '~> 6.15.3' s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'PromiseKit/CorePromise', '~> 6.15.3' end 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 96acdc5e825..68c3c6ee7e4 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -201,4 +201,4 @@ extension RequestBuilder { } return deferred.promise } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/readonlyProperties/Cartfile b/samples/client/petstore/swift5/readonlyProperties/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/readonlyProperties/Cartfile +++ b/samples/client/petstore/swift5/readonlyProperties/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/resultLibrary/Cartfile b/samples/client/petstore/swift5/resultLibrary/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/resultLibrary/Cartfile +++ b/samples/client/petstore/swift5/resultLibrary/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Cartfile b/samples/client/petstore/swift5/rxswiftLibrary/Cartfile index a095f11173e..bd01f4a21d0 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/Cartfile +++ b/samples/client/petstore/swift5/rxswiftLibrary/Cartfile @@ -1,3 +1,2 @@ - -github "ReactiveX/RxSwift" ~> 6.2.0 github "Flight-School/AnyCodable" ~> 0.6.1 +github "ReactiveX/RxSwift" ~> 6.2.0 diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec index 12688d5c28d..044fb638350 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec @@ -11,6 +11,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'RxSwift', '~> 6.2.0' s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'RxSwift', '~> 6.2.0' end 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 a11a8925afd..dc0913d093f 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -99,4 +99,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Cartfile b/samples/client/petstore/swift5/urlsessionLibrary/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Cartfile +++ b/samples/client/petstore/swift5/urlsessionLibrary/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift index a4f0c7a3b36..e23035dde30 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +} diff --git a/samples/client/petstore/swift5/x-swift-hashable/Cartfile b/samples/client/petstore/swift5/x-swift-hashable/Cartfile index a6a6bcacb1d..3f7e6304cab 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/Cartfile +++ b/samples/client/petstore/swift5/x-swift-hashable/Cartfile @@ -1,2 +1 @@ - github "Flight-School/AnyCodable" ~> 0.6.1 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 a4f0c7a3b36..e23035dde30 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 @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} \ No newline at end of file +}