From ca994af0b8e9c024aebb2bc026007870a95050a1 Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@gmail.com> Date: Mon, 28 Dec 2020 09:57:06 +0000 Subject: [PATCH 1/3] [swift] remove old swift sample --- samples/client/test/swift5/default/.gitignore | 63 -- .../swift5/default/.openapi-generator-ignore | 23 - .../swift5/default/.openapi-generator/FILES | 58 -- .../swift5/default/.openapi-generator/VERSION | 1 - .../contents.xcworkspacedata | 7 - samples/client/test/swift5/default/Cartfile | 1 - samples/client/test/swift5/default/Info.plist | 22 - .../client/test/swift5/default/Package.swift | 31 - samples/client/test/swift5/default/README.md | 63 -- .../test/swift5/default/TestClient.podspec | 14 - .../TestClient.xcodeproj/project.pbxproj | 433 ------------- .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcschemes/TestClient.xcscheme | 93 --- .../Classes/OpenAPIs/APIHelper.swift | 71 --- .../TestClient/Classes/OpenAPIs/APIs.swift | 64 -- .../Classes/OpenAPIs/APIs/Swift5TestAPI.swift | 51 -- .../Classes/OpenAPIs/CodableHelper.swift | 48 -- .../Classes/OpenAPIs/Configuration.swift | 16 - .../Classes/OpenAPIs/Extensions.swift | 179 ------ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 -- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 -- .../TestClient/Classes/OpenAPIs/Models.swift | 54 -- .../OpenAPIs/Models/AllPrimitives.swift | 72 --- .../Classes/OpenAPIs/Models/BaseCard.swift | 19 - .../Classes/OpenAPIs/Models/ErrorInfo.swift | 23 - .../OpenAPIs/Models/GetAllModelsResult.swift | 23 - .../OpenAPIs/Models/ModelDoubleArray.swift | 11 - .../OpenAPIs/Models/ModelErrorInfoArray.swift | 11 - .../OpenAPIs/Models/ModelStringArray.swift | 11 - ...ModelWithIntAdditionalPropertiesOnly.swift | 46 -- ...ithPropertiesAndAdditionalProperties.swift | 89 --- ...elWithStringAdditionalPropertiesOnly.swift | 46 -- .../Classes/OpenAPIs/Models/PersonCard.swift | 23 - .../OpenAPIs/Models/PersonCardAllOf.swift | 20 - .../Classes/OpenAPIs/Models/PlaceCard.swift | 23 - .../OpenAPIs/Models/PlaceCardAllOf.swift | 20 - .../Classes/OpenAPIs/Models/SampleBase.swift | 21 - .../OpenAPIs/Models/SampleSubClass.swift | 25 - .../OpenAPIs/Models/SampleSubClassAllOf.swift | 20 - .../Classes/OpenAPIs/Models/StringEnum.swift | 14 - .../OpenAPIs/Models/VariableNameTest.swift | 32 - .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 -- .../OpenAPIs/SynchronizedDictionary.swift | 36 -- .../OpenAPIs/URLSessionImplementations.swift | 589 ------------------ .../swift5/default/TestClientApp/.gitignore | 72 --- .../test/swift5/default/TestClientApp/Podfile | 13 - .../swift5/default/TestClientApp/Podfile.lock | 16 - .../TestClientApp.xcodeproj/project.pbxproj | 546 ---------------- .../contents.xcworkspacedata | 7 - .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../TestClientApp/AppDelegate.swift | 43 -- .../AppIcon.appiconset/Contents.json | 93 --- .../Base.lproj/LaunchScreen.storyboard | 25 - .../TestClientApp/Base.lproj/Main.storyboard | 24 - .../TestClientApp/TestClientApp/Info.plist | 45 -- .../TestClientApp/ViewController.swift | 23 - .../TestClientAppTests/Info.plist | 22 - .../TestClientAppTests.swift | 35 -- .../test/swift5/default/TestClientApp/pom.xml | 43 -- .../default/TestClientApp/run_xcodebuild.sh | 5 - .../test/swift5/default/docs/AllPrimitives.md | 34 - .../test/swift5/default/docs/BaseCard.md | 10 - .../test/swift5/default/docs/ErrorInfo.md | 12 - .../swift5/default/docs/GetAllModelsResult.md | 12 - .../swift5/default/docs/ModelDoubleArray.md | 9 - .../default/docs/ModelErrorInfoArray.md | 9 - .../swift5/default/docs/ModelStringArray.md | 9 - .../ModelWithIntAdditionalPropertiesOnly.md | 9 - ...elWithPropertiesAndAdditionalProperties.md | 17 - ...ModelWithStringAdditionalPropertiesOnly.md | 9 - .../test/swift5/default/docs/PersonCard.md | 11 - .../swift5/default/docs/PersonCardAllOf.md | 11 - .../test/swift5/default/docs/PlaceCard.md | 11 - .../swift5/default/docs/PlaceCardAllOf.md | 11 - .../test/swift5/default/docs/SampleBase.md | 11 - .../swift5/default/docs/SampleSubClass.md | 13 - .../default/docs/SampleSubClassAllOf.md | 11 - .../test/swift5/default/docs/StringEnum.md | 9 - .../test/swift5/default/docs/Swift5TestAPI.md | 59 -- .../swift5/default/docs/VariableNameTest.md | 12 - .../client/test/swift5/default/git_push.sh | 58 -- samples/client/test/swift5/default/pom.xml | 43 -- .../client/test/swift5/default/project.yml | 14 - .../test/swift5/default/run_spmbuild.sh | 3 - samples/client/test/swift5/swift5_test_all.sh | 11 - 87 files changed, 4071 deletions(-) delete mode 100644 samples/client/test/swift5/default/.gitignore delete mode 100644 samples/client/test/swift5/default/.openapi-generator-ignore delete mode 100644 samples/client/test/swift5/default/.openapi-generator/FILES delete mode 100644 samples/client/test/swift5/default/.openapi-generator/VERSION delete mode 100644 samples/client/test/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata delete mode 100644 samples/client/test/swift5/default/Cartfile delete mode 100644 samples/client/test/swift5/default/Info.plist delete mode 100644 samples/client/test/swift5/default/Package.swift delete mode 100644 samples/client/test/swift5/default/README.md delete mode 100644 samples/client/test/swift5/default/TestClient.podspec delete mode 100644 samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj delete mode 100644 samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 samples/client/test/swift5/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIHelper.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/CodableHelper.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Configuration.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Extensions.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONDataEncoding.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift delete mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift delete mode 100644 samples/client/test/swift5/default/TestClientApp/.gitignore delete mode 100644 samples/client/test/swift5/default/TestClientApp/Podfile delete mode 100644 samples/client/test/swift5/default/TestClientApp/Podfile.lock delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/AppDelegate.swift delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/Info.plist delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/ViewController.swift delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientAppTests/Info.plist delete mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift delete mode 100644 samples/client/test/swift5/default/TestClientApp/pom.xml delete mode 100755 samples/client/test/swift5/default/TestClientApp/run_xcodebuild.sh delete mode 100644 samples/client/test/swift5/default/docs/AllPrimitives.md delete mode 100644 samples/client/test/swift5/default/docs/BaseCard.md delete mode 100644 samples/client/test/swift5/default/docs/ErrorInfo.md delete mode 100644 samples/client/test/swift5/default/docs/GetAllModelsResult.md delete mode 100644 samples/client/test/swift5/default/docs/ModelDoubleArray.md delete mode 100644 samples/client/test/swift5/default/docs/ModelErrorInfoArray.md delete mode 100644 samples/client/test/swift5/default/docs/ModelStringArray.md delete mode 100644 samples/client/test/swift5/default/docs/ModelWithIntAdditionalPropertiesOnly.md delete mode 100644 samples/client/test/swift5/default/docs/ModelWithPropertiesAndAdditionalProperties.md delete mode 100644 samples/client/test/swift5/default/docs/ModelWithStringAdditionalPropertiesOnly.md delete mode 100644 samples/client/test/swift5/default/docs/PersonCard.md delete mode 100644 samples/client/test/swift5/default/docs/PersonCardAllOf.md delete mode 100644 samples/client/test/swift5/default/docs/PlaceCard.md delete mode 100644 samples/client/test/swift5/default/docs/PlaceCardAllOf.md delete mode 100644 samples/client/test/swift5/default/docs/SampleBase.md delete mode 100644 samples/client/test/swift5/default/docs/SampleSubClass.md delete mode 100644 samples/client/test/swift5/default/docs/SampleSubClassAllOf.md delete mode 100644 samples/client/test/swift5/default/docs/StringEnum.md delete mode 100644 samples/client/test/swift5/default/docs/Swift5TestAPI.md delete mode 100644 samples/client/test/swift5/default/docs/VariableNameTest.md delete mode 100644 samples/client/test/swift5/default/git_push.sh delete mode 100644 samples/client/test/swift5/default/pom.xml delete mode 100644 samples/client/test/swift5/default/project.yml delete mode 100755 samples/client/test/swift5/default/run_spmbuild.sh delete mode 100755 samples/client/test/swift5/swift5_test_all.sh diff --git a/samples/client/test/swift5/default/.gitignore b/samples/client/test/swift5/default/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/test/swift5/default/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/test/swift5/default/.openapi-generator-ignore b/samples/client/test/swift5/default/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/test/swift5/default/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/test/swift5/default/.openapi-generator/FILES b/samples/client/test/swift5/default/.openapi-generator/FILES deleted file mode 100644 index 9305dc08d2c0..000000000000 --- a/samples/client/test/swift5/default/.openapi-generator/FILES +++ /dev/null @@ -1,58 +0,0 @@ -.gitignore -Cartfile -Package.swift -README.md -TestClient.podspec -TestClient/Classes/OpenAPIs/APIHelper.swift -TestClient/Classes/OpenAPIs/APIs.swift -TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift -TestClient/Classes/OpenAPIs/CodableHelper.swift -TestClient/Classes/OpenAPIs/Configuration.swift -TestClient/Classes/OpenAPIs/Extensions.swift -TestClient/Classes/OpenAPIs/JSONDataEncoding.swift -TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift -TestClient/Classes/OpenAPIs/Models.swift -TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift -TestClient/Classes/OpenAPIs/Models/BaseCard.swift -TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift -TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift -TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift -TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift -TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift -TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift -TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift -TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift -TestClient/Classes/OpenAPIs/Models/PersonCard.swift -TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift -TestClient/Classes/OpenAPIs/Models/PlaceCard.swift -TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift -TestClient/Classes/OpenAPIs/Models/SampleBase.swift -TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift -TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift -TestClient/Classes/OpenAPIs/Models/StringEnum.swift -TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift -TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift -TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift -TestClient/Classes/OpenAPIs/URLSessionImplementations.swift -docs/AllPrimitives.md -docs/BaseCard.md -docs/ErrorInfo.md -docs/GetAllModelsResult.md -docs/ModelDoubleArray.md -docs/ModelErrorInfoArray.md -docs/ModelStringArray.md -docs/ModelWithIntAdditionalPropertiesOnly.md -docs/ModelWithPropertiesAndAdditionalProperties.md -docs/ModelWithStringAdditionalPropertiesOnly.md -docs/PersonCard.md -docs/PersonCardAllOf.md -docs/PlaceCard.md -docs/PlaceCardAllOf.md -docs/SampleBase.md -docs/SampleSubClass.md -docs/SampleSubClassAllOf.md -docs/StringEnum.md -docs/Swift5TestAPI.md -docs/VariableNameTest.md -git_push.sh -project.yml diff --git a/samples/client/test/swift5/default/.openapi-generator/VERSION b/samples/client/test/swift5/default/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01f..000000000000 --- a/samples/client/test/swift5/default/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/test/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/test/swift5/default/Cartfile b/samples/client/test/swift5/default/Cartfile deleted file mode 100644 index 8b137891791f..000000000000 --- a/samples/client/test/swift5/default/Cartfile +++ /dev/null @@ -1 +0,0 @@ - diff --git a/samples/client/test/swift5/default/Info.plist b/samples/client/test/swift5/default/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/test/swift5/default/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/test/swift5/default/Package.swift b/samples/client/test/swift5/default/Package.swift deleted file mode 100644 index 25d70eebdedc..000000000000 --- a/samples/client/test/swift5/default/Package.swift +++ /dev/null @@ -1,31 +0,0 @@ -// swift-tools-version:5.0 - -import PackageDescription - -let package = Package( - name: "TestClient", - platforms: [ - .iOS(.v9), - .macOS(.v10_11), - .tvOS(.v9), - .watchOS(.v3) - ], - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "TestClient", - targets: ["TestClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "TestClient", - dependencies: [], - path: "TestClient/Classes" - ) - ] -) diff --git a/samples/client/test/swift5/default/README.md b/samples/client/test/swift5/default/README.md deleted file mode 100644 index bb57a7ddf5d1..000000000000 --- a/samples/client/test/swift5/default/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Swift5 API client for TestClient - -This is a test schema which exercises Swagger schema features for testing the swift5 language codegen module. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 1.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen -For more information, please visit [http://www.example.com](http://www.example.com) - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://api.example.com/basePath* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*Swift5TestAPI* | [**getAllModels**](docs/Swift5TestAPI.md#getallmodels) | **GET** /allModels | Get all of the models - - -## Documentation For Models - - - [AllPrimitives](docs/AllPrimitives.md) - - [BaseCard](docs/BaseCard.md) - - [ErrorInfo](docs/ErrorInfo.md) - - [GetAllModelsResult](docs/GetAllModelsResult.md) - - [ModelDoubleArray](docs/ModelDoubleArray.md) - - [ModelErrorInfoArray](docs/ModelErrorInfoArray.md) - - [ModelStringArray](docs/ModelStringArray.md) - - [ModelWithIntAdditionalPropertiesOnly](docs/ModelWithIntAdditionalPropertiesOnly.md) - - [ModelWithPropertiesAndAdditionalProperties](docs/ModelWithPropertiesAndAdditionalProperties.md) - - [ModelWithStringAdditionalPropertiesOnly](docs/ModelWithStringAdditionalPropertiesOnly.md) - - [PersonCard](docs/PersonCard.md) - - [PersonCardAllOf](docs/PersonCardAllOf.md) - - [PlaceCard](docs/PlaceCard.md) - - [PlaceCardAllOf](docs/PlaceCardAllOf.md) - - [SampleBase](docs/SampleBase.md) - - [SampleSubClass](docs/SampleSubClass.md) - - [SampleSubClassAllOf](docs/SampleSubClassAllOf.md) - - [StringEnum](docs/StringEnum.md) - - [VariableNameTest](docs/VariableNameTest.md) - - -## Documentation For Authorization - - All endpoints do not require authorization. - - -## Author - -jdoe@example.com - diff --git a/samples/client/test/swift5/default/TestClient.podspec b/samples/client/test/swift5/default/TestClient.podspec deleted file mode 100644 index e9d41bfad0b6..000000000000 --- a/samples/client/test/swift5/default/TestClient.podspec +++ /dev/null @@ -1,14 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'TestClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.watchos.deployment_target = '3.0' - s.version = '1.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'TestClient' - s.source_files = 'TestClient/Classes/**/*.swift' -end diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj b/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj deleted file mode 100644 index 51cda391135b..000000000000 --- a/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,433 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0061472DD11FF6D7742349C7 /* PersonCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CDB0CB291617B59C7E29CB /* PersonCard.swift */; }; - 05AA5B59607A30F18E94292F /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */; }; - 1415101700773F07D9E14327 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F6F3F378FFC3FC0AC42268D /* APIs.swift */; }; - 19E70FF1DDE7B0282F400F45 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6AD136503821775A39AEEEA /* APIHelper.swift */; }; - 2002BB13501E9D1F5952C760 /* SampleSubClassAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */; }; - 27F628F6D077CE2DCC6CC337 /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */; }; - 3DC6743F3ECD7005940DED98 /* GetAllModelsResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */; }; - 3F20DE4CB1AD4F3A2ED05326 /* SampleSubClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */; }; - 4209C8951507A706227F2A85 /* SampleBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */; }; - 493DB82F57B410C3C40CDD6B /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */; }; - 4D1CD48EC9034A49C536DF05 /* BaseCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = C209BA7D3B7026133ACB6149 /* BaseCard.swift */; }; - 561FBF0BA4127AAA4B2EB66D /* AllPrimitives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */; }; - 5C7477A5CDC76B3293CBBC53 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = A140137667E350EAFDE010EA /* Models.swift */; }; - 60CBE570B8DBA382B5D4628C /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFD27529F413FEDE10F4D1C3 /* OpenISO8601DateFormatter.swift */; }; - 61C214786C3EA609EFA4C609 /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B832520FF3AFCB54E7A0EF5 /* SynchronizedDictionary.swift */; }; - 633435C240C960AFE29EEF3A /* StringEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BD76CE1B85046CF575F42B /* StringEnum.swift */; }; - 6B1961ED41DFDFDB3029BE6F /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3D0164E2EEC228143968A2D /* Extensions.swift */; }; - 74086BA23A6B245C5C9120F4 /* Swift5TestAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6967E74308DBD6384CBA5624 /* Swift5TestAPI.swift */; }; - 7C22E572E92D490CC366F0C2 /* ErrorInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A813A17AF964F26FB864212 /* ErrorInfo.swift */; }; - 7F99AF29003DAFA2AFC85FEC /* ModelDoubleArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */; }; - 8F02FB3DCBA785F15F6BA602 /* PlaceCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */; }; - 9193BA83FEDAFA9788D03ACF /* PlaceCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */; }; - A4E70E34B9EABA6E7C911B37 /* ModelErrorInfoArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */; }; - AC78737EC4A34F22FC3D5E8C /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BA682C97038055435A32D0 /* CodableHelper.swift */; }; - B9B6C1BCD95B3D46719F0C57 /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437CEDD9014FF755F5FCC890 /* URLSessionImplementations.swift */; }; - D43D0FC46CD094545F0284F3 /* PersonCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */; }; - E29D4269C5947A5CFCE3A810 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */; }; - E32B8F685CB25522E611ED1D /* ModelStringArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */; }; - E5983001C8012C8986583D7B /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = F28BFEFC78B58C5329B65A2A /* JSONDataEncoding.swift */; }; - FB58DEE4F76D0111D3218BDF /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */; }; - FD7D9D3454F9C64656CDCB8B /* VariableNameTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceCard.swift; sourceTree = ""; }; - 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithPropertiesAndAdditionalProperties.swift; sourceTree = ""; }; - 1A813A17AF964F26FB864212 /* ErrorInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorInfo.swift; sourceTree = ""; }; - 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCardAllOf.swift; sourceTree = ""; }; - 30CDB0CB291617B59C7E29CB /* PersonCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCard.swift; sourceTree = ""; }; - 437CEDD9014FF755F5FCC890 /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; - 4F6F3F378FFC3FC0AC42268D /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelStringArray.swift; sourceTree = ""; }; - 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSubClassAllOf.swift; sourceTree = ""; }; - 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithIntAdditionalPropertiesOnly.swift; sourceTree = ""; }; - 6967E74308DBD6384CBA5624 /* Swift5TestAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Swift5TestAPI.swift; sourceTree = ""; }; - 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithStringAdditionalPropertiesOnly.swift; sourceTree = ""; }; - 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VariableNameTest.swift; sourceTree = ""; }; - 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllPrimitives.swift; sourceTree = ""; }; - 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceCardAllOf.swift; sourceTree = ""; }; - 8B832520FF3AFCB54E7A0EF5 /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; - 93BA682C97038055435A32D0 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 9FD147676BF8F2DD7E471810 /* TestClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A140137667E350EAFDE010EA /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - A3BD76CE1B85046CF575F42B /* StringEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringEnum.swift; sourceTree = ""; }; - ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetAllModelsResult.swift; sourceTree = ""; }; - C209BA7D3B7026133ACB6149 /* BaseCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCard.swift; sourceTree = ""; }; - C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelErrorInfoArray.swift; sourceTree = ""; }; - C6AD136503821775A39AEEEA /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleBase.swift; sourceTree = ""; }; - CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - D3D0164E2EEC228143968A2D /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSubClass.swift; sourceTree = ""; }; - EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelDoubleArray.swift; sourceTree = ""; }; - EFD27529F413FEDE10F4D1C3 /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; - F28BFEFC78B58C5329B65A2A /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXGroup section */ - 3049D31996790CF8E31B6F01 = { - isa = PBXGroup; - children = ( - 8C649F3AF4A7C6D66B52AA38 /* TestClient */, - CBA5AD47CD6A6AF075403DD1 /* Products */, - ); - sourceTree = ""; - }; - 3A1CFAB4CC75547815260F88 /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - C6AD136503821775A39AEEEA /* APIHelper.swift */, - 4F6F3F378FFC3FC0AC42268D /* APIs.swift */, - 93BA682C97038055435A32D0 /* CodableHelper.swift */, - CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */, - D3D0164E2EEC228143968A2D /* Extensions.swift */, - F28BFEFC78B58C5329B65A2A /* JSONDataEncoding.swift */, - 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */, - A140137667E350EAFDE010EA /* Models.swift */, - EFD27529F413FEDE10F4D1C3 /* OpenISO8601DateFormatter.swift */, - 8B832520FF3AFCB54E7A0EF5 /* SynchronizedDictionary.swift */, - 437CEDD9014FF755F5FCC890 /* URLSessionImplementations.swift */, - AC6589BAFE1BDABB49267C33 /* APIs */, - 9A5460679035417A84B6C884 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 3E4B2B40F4EEE4F7E6149EBF /* Classes */ = { - isa = PBXGroup; - children = ( - 3A1CFAB4CC75547815260F88 /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - 8C649F3AF4A7C6D66B52AA38 /* TestClient */ = { - isa = PBXGroup; - children = ( - 3E4B2B40F4EEE4F7E6149EBF /* Classes */, - ); - path = TestClient; - sourceTree = ""; - }; - 9A5460679035417A84B6C884 /* Models */ = { - isa = PBXGroup; - children = ( - 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */, - C209BA7D3B7026133ACB6149 /* BaseCard.swift */, - 1A813A17AF964F26FB864212 /* ErrorInfo.swift */, - ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */, - EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */, - C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */, - 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */, - 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */, - 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */, - 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */, - 30CDB0CB291617B59C7E29CB /* PersonCard.swift */, - 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */, - 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */, - 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */, - CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */, - EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */, - 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */, - A3BD76CE1B85046CF575F42B /* StringEnum.swift */, - 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */, - ); - path = Models; - sourceTree = ""; - }; - AC6589BAFE1BDABB49267C33 /* APIs */ = { - isa = PBXGroup; - children = ( - 6967E74308DBD6384CBA5624 /* Swift5TestAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; - CBA5AD47CD6A6AF075403DD1 /* Products */ = { - isa = PBXGroup; - children = ( - 9FD147676BF8F2DD7E471810 /* TestClient.framework */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 57071453919863518A53B6C4 /* TestClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8C5DAAB4D2F2BC3EB2A18339 /* Build configuration list for PBXNativeTarget "TestClient" */; - buildPhases = ( - 411C0E7C892A386592910621 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TestClient; - productName = TestClient; - productReference = 9FD147676BF8F2DD7E471810 /* TestClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 498565B44CD0696E30C61F1F /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - TargetAttributes = { - }; - }; - buildConfigurationList = 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 3049D31996790CF8E31B6F01; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 57071453919863518A53B6C4 /* TestClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 411C0E7C892A386592910621 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 19E70FF1DDE7B0282F400F45 /* APIHelper.swift in Sources */, - 1415101700773F07D9E14327 /* APIs.swift in Sources */, - 561FBF0BA4127AAA4B2EB66D /* AllPrimitives.swift in Sources */, - 4D1CD48EC9034A49C536DF05 /* BaseCard.swift in Sources */, - AC78737EC4A34F22FC3D5E8C /* CodableHelper.swift in Sources */, - E29D4269C5947A5CFCE3A810 /* Configuration.swift in Sources */, - 7C22E572E92D490CC366F0C2 /* ErrorInfo.swift in Sources */, - 6B1961ED41DFDFDB3029BE6F /* Extensions.swift in Sources */, - 3DC6743F3ECD7005940DED98 /* GetAllModelsResult.swift in Sources */, - E5983001C8012C8986583D7B /* JSONDataEncoding.swift in Sources */, - FB58DEE4F76D0111D3218BDF /* JSONEncodingHelper.swift in Sources */, - 7F99AF29003DAFA2AFC85FEC /* ModelDoubleArray.swift in Sources */, - A4E70E34B9EABA6E7C911B37 /* ModelErrorInfoArray.swift in Sources */, - E32B8F685CB25522E611ED1D /* ModelStringArray.swift in Sources */, - 27F628F6D077CE2DCC6CC337 /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */, - 493DB82F57B410C3C40CDD6B /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */, - 05AA5B59607A30F18E94292F /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */, - 5C7477A5CDC76B3293CBBC53 /* Models.swift in Sources */, - 60CBE570B8DBA382B5D4628C /* OpenISO8601DateFormatter.swift in Sources */, - 0061472DD11FF6D7742349C7 /* PersonCard.swift in Sources */, - D43D0FC46CD094545F0284F3 /* PersonCardAllOf.swift in Sources */, - 8F02FB3DCBA785F15F6BA602 /* PlaceCard.swift in Sources */, - 9193BA83FEDAFA9788D03ACF /* PlaceCardAllOf.swift in Sources */, - 4209C8951507A706227F2A85 /* SampleBase.swift in Sources */, - 3F20DE4CB1AD4F3A2ED05326 /* SampleSubClass.swift in Sources */, - 2002BB13501E9D1F5952C760 /* SampleSubClassAllOf.swift in Sources */, - 633435C240C960AFE29EEF3A /* StringEnum.swift in Sources */, - 74086BA23A6B245C5C9120F4 /* Swift5TestAPI.swift in Sources */, - 61C214786C3EA609EFA4C609 /* SynchronizedDictionary.swift in Sources */, - B9B6C1BCD95B3D46719F0C57 /* URLSessionImplementations.swift in Sources */, - FD7D9D3454F9C64656CDCB8B /* VariableNameTest.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1D58A58AE8D976D68029505F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 20BF9E8F2FA4569489A9CEAC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 295215B264B439F2CFBEFBA2 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 4CDAC84BFAB424A21776ADCA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 20BF9E8F2FA4569489A9CEAC /* Debug */, - 295215B264B439F2CFBEFBA2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 8C5DAAB4D2F2BC3EB2A18339 /* Build configuration list for PBXNativeTarget "TestClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D58A58AE8D976D68029505F /* Debug */, - 4CDAC84BFAB424A21776ADCA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = 498565B44CD0696E30C61F1F /* Project object */; -} diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 37b1c0c5bb4b..000000000000 --- a/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme b/samples/client/test/swift5/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme deleted file mode 100644 index 8011cf09204e..000000000000 --- a/samples/client/test/swift5/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 5b09f9557113..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,71 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in - result.append(URLQueryItem(name: item.key, value: value)) - } - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index d2c1afbb9bc0..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,64 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class TestClientAPI { - public static var basePath = "http://api.example.com/basePath" - public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. - /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(TestClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ apiResponseQueue: DispatchQueue = TestClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = TestClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift deleted file mode 100644 index 6987b61a1a4d..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// Swift5TestAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Swift5TestAPI { - /** - Get all of the models - - - parameter clientId: (query) id that represent the Api client - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getAllModels(clientId: String, apiResponseQueue: DispatchQueue = TestClientAPI.apiResponseQueue, completion: @escaping ((_ data: GetAllModelsResult?, _ error: Error?) -> Void)) { - getAllModelsWithRequestBuilder(clientId: clientId).execute(apiResponseQueue) { result -> Void in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - Get all of the models - - GET /allModels - - This endpoint tests get a dictionary which contains examples of all of the models. - - parameter clientId: (query) id that represent the Api client - - returns: RequestBuilder - */ - open class func getAllModelsWithRequestBuilder(clientId: String) -> RequestBuilder { - let path = "/allModels" - let URLString = TestClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "client_id": clientId.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = TestClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index ef971ebadc60..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> Swift.Result where T: Decodable { - return Swift.Result { try self.jsonDecoder.decode(type, from: data) } - } - - open class func encode(_ value: T) -> Swift.Result where T: Encodable { - return Swift.Result { try self.jsonEncoder.encode(value) } - } -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Configuration.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index 627d9adb757e..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,16 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Extensions.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 93ed6b90b376..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,179 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} - -extension HTTPURLResponse { - var isStatusCodeSuccessful: Bool { - return Array(200 ..< 300).contains(statusCode) - } -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONDataEncoding.swift deleted file mode 100644 index b79e9f5e64d5..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct JSONDataEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { - var urlRequest = urlRequest - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? - if let jsonData = jsonData, !jsonData.isEmpty { - var params: [String: Any] = [:] - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 02f78ffb4705..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - do { - let data = try encodeResult.get() - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error.localizedDescription) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error.localizedDescription) - return nil - } - } - - return params - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index c0542c14c081..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,54 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -public enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum DecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case unsuccessfulHTTPStatusCode - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for (key, value) in rawHeader { - if let key = key.base as? String, let value = value as? String { - header[key] = value - } - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift deleted file mode 100644 index dc6571db3e95..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// AllPrimitives.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Object which contains lots of different primitive OpenAPI types */ -public struct AllPrimitives: Codable { - - public enum MyInlineStringEnum: String, Codable, CaseIterable { - case inlinestringenumvalue1 = "inlineStringEnumValue1" - case inlinestringenumvalue2 = "inlineStringEnumValue2" - case inlinestringenumvalue3 = "inlineStringEnumValue3" - } - public var myInteger: Int? - public var myIntegerArray: [Int]? - public var myLong: Int64? - public var myLongArray: [Int64]? - public var myFloat: Float? - public var myFloatArray: [Float]? - public var myDouble: Double? - public var myDoubleArray: [Double]? - public var myString: String? - public var myStringArray: [String]? - public var myBytes: Data? - public var myBytesArray: [Data]? - public var myBoolean: Bool? - public var myBooleanArray: [Bool]? - public var myDate: Date? - public var myDateArray: [Date]? - public var myDateTime: Date? - public var myDateTimeArray: [Date]? - public var myFile: URL? - public var myFileArray: [URL]? - public var myUUID: UUID? - public var myUUIDArray: [UUID]? - public var myStringEnum: StringEnum? - public var myStringEnumArray: [StringEnum]? - public var myInlineStringEnum: MyInlineStringEnum? - - public init(myInteger: Int?, myIntegerArray: [Int]?, myLong: Int64?, myLongArray: [Int64]?, myFloat: Float?, myFloatArray: [Float]?, myDouble: Double?, myDoubleArray: [Double]?, myString: String?, myStringArray: [String]?, myBytes: Data?, myBytesArray: [Data]?, myBoolean: Bool?, myBooleanArray: [Bool]?, myDate: Date?, myDateArray: [Date]?, myDateTime: Date?, myDateTimeArray: [Date]?, myFile: URL?, myFileArray: [URL]?, myUUID: UUID?, myUUIDArray: [UUID]?, myStringEnum: StringEnum?, myStringEnumArray: [StringEnum]?, myInlineStringEnum: MyInlineStringEnum?) { - self.myInteger = myInteger - self.myIntegerArray = myIntegerArray - self.myLong = myLong - self.myLongArray = myLongArray - self.myFloat = myFloat - self.myFloatArray = myFloatArray - self.myDouble = myDouble - self.myDoubleArray = myDoubleArray - self.myString = myString - self.myStringArray = myStringArray - self.myBytes = myBytes - self.myBytesArray = myBytesArray - self.myBoolean = myBoolean - self.myBooleanArray = myBooleanArray - self.myDate = myDate - self.myDateArray = myDateArray - self.myDateTime = myDateTime - self.myDateTimeArray = myDateTimeArray - self.myFile = myFile - self.myFileArray = myFileArray - self.myUUID = myUUID - self.myUUIDArray = myUUIDArray - self.myStringEnum = myStringEnum - self.myStringEnumArray = myStringEnumArray - self.myInlineStringEnum = myInlineStringEnum - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift deleted file mode 100644 index 2ffb3a5e1ab9..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// BaseCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a base card object which uses a 'cardType' discriminator. */ -public struct BaseCard: Codable { - - public var cardType: String - - public init(cardType: String) { - self.cardType = cardType - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift deleted file mode 100644 index c2b1fcda5868..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ErrorInfo.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Example Error object */ -public struct ErrorInfo: Codable { - - public var code: Int? - public var message: String? - public var details: [String]? - - public init(code: Int?, message: String?, details: [String]?) { - self.code = code - self.message = message - self.details = details - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift deleted file mode 100644 index b8cfedbe94af..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// GetAllModelsResult.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Response object containing AllPrimitives object */ -public struct GetAllModelsResult: Codable { - - public var myPrimitiveArray: [AllPrimitives]? - public var myPrimitive: AllPrimitives? - public var myVariableNameTest: VariableNameTest? - - public init(myPrimitiveArray: [AllPrimitives]?, myPrimitive: AllPrimitives?, myVariableNameTest: VariableNameTest?) { - self.myPrimitiveArray = myPrimitiveArray - self.myPrimitive = myPrimitive - self.myVariableNameTest = myVariableNameTest - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift deleted file mode 100644 index 9e523219a446..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ModelDoubleArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This defines an array of doubles. */ -public typealias ModelDoubleArray = [Double] diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift deleted file mode 100644 index 358c83dc7a91..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ModelErrorInfoArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This defines an array of ErrorInfo objects. */ -public typealias ModelErrorInfoArray = [ErrorInfo] diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift deleted file mode 100644 index 6a614cc36019..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ModelStringArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This defines an array of strings. */ -public typealias ModelStringArray = [String] diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift deleted file mode 100644 index 2878543406a4..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// ModelWithIntAdditionalPropertiesOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is an empty model with no properties and only additionalProperties of type int32 */ -public struct ModelWithIntAdditionalPropertiesOnly: Codable { - - public var additionalProperties: [String: Int] = [:] - - public subscript(key: String) -> Int? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Int.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift deleted file mode 100644 index d8f115cb4998..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// ModelWithPropertiesAndAdditionalProperties.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is an empty model with no properties and only additionalProperties of type int32 */ -public struct ModelWithPropertiesAndAdditionalProperties: Codable { - - public var myIntegerReq: Int - public var myIntegerOpt: Int? - public var myPrimitiveReq: AllPrimitives - public var myPrimitiveOpt: AllPrimitives? - public var myStringArrayReq: [String] - public var myStringArrayOpt: [String]? - public var myPrimitiveArrayReq: [AllPrimitives] - public var myPrimitiveArrayOpt: [AllPrimitives]? - - public init(myIntegerReq: Int, myIntegerOpt: Int?, myPrimitiveReq: AllPrimitives, myPrimitiveOpt: AllPrimitives?, myStringArrayReq: [String], myStringArrayOpt: [String]?, myPrimitiveArrayReq: [AllPrimitives], myPrimitiveArrayOpt: [AllPrimitives]?) { - self.myIntegerReq = myIntegerReq - self.myIntegerOpt = myIntegerOpt - self.myPrimitiveReq = myPrimitiveReq - self.myPrimitiveOpt = myPrimitiveOpt - self.myStringArrayReq = myStringArrayReq - self.myStringArrayOpt = myStringArrayOpt - self.myPrimitiveArrayReq = myPrimitiveArrayReq - self.myPrimitiveArrayOpt = myPrimitiveArrayOpt - } - public var additionalProperties: [String: String] = [:] - - public subscript(key: String) -> String? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(myIntegerReq, forKey: "myIntegerReq") - try container.encodeIfPresent(myIntegerOpt, forKey: "myIntegerOpt") - try container.encode(myPrimitiveReq, forKey: "myPrimitiveReq") - try container.encodeIfPresent(myPrimitiveOpt, forKey: "myPrimitiveOpt") - try container.encode(myStringArrayReq, forKey: "myStringArrayReq") - try container.encodeIfPresent(myStringArrayOpt, forKey: "myStringArrayOpt") - try container.encode(myPrimitiveArrayReq, forKey: "myPrimitiveArrayReq") - try container.encodeIfPresent(myPrimitiveArrayOpt, forKey: "myPrimitiveArrayOpt") - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - myIntegerReq = try container.decode(Int.self, forKey: "myIntegerReq") - myIntegerOpt = try container.decodeIfPresent(Int.self, forKey: "myIntegerOpt") - myPrimitiveReq = try container.decode(AllPrimitives.self, forKey: "myPrimitiveReq") - myPrimitiveOpt = try container.decodeIfPresent(AllPrimitives.self, forKey: "myPrimitiveOpt") - myStringArrayReq = try container.decode([String].self, forKey: "myStringArrayReq") - myStringArrayOpt = try container.decodeIfPresent([String].self, forKey: "myStringArrayOpt") - myPrimitiveArrayReq = try container.decode([AllPrimitives].self, forKey: "myPrimitiveArrayReq") - myPrimitiveArrayOpt = try container.decodeIfPresent([AllPrimitives].self, forKey: "myPrimitiveArrayOpt") - var nonAdditionalPropertyKeys = Set() - nonAdditionalPropertyKeys.insert("myIntegerReq") - nonAdditionalPropertyKeys.insert("myIntegerOpt") - nonAdditionalPropertyKeys.insert("myPrimitiveReq") - nonAdditionalPropertyKeys.insert("myPrimitiveOpt") - nonAdditionalPropertyKeys.insert("myStringArrayReq") - nonAdditionalPropertyKeys.insert("myStringArrayOpt") - nonAdditionalPropertyKeys.insert("myPrimitiveArrayReq") - nonAdditionalPropertyKeys.insert("myPrimitiveArrayOpt") - additionalProperties = try container.decodeMap(String.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift deleted file mode 100644 index fffed8885315..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// ModelWithStringAdditionalPropertiesOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is an empty model with no properties and only additionalProperties of type string */ -public struct ModelWithStringAdditionalPropertiesOnly: Codable { - - public var additionalProperties: [String: String] = [:] - - public subscript(key: String) -> String? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(String.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift deleted file mode 100644 index db1a081b275d..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// PersonCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a card object for a Person derived from BaseCard. */ -public struct PersonCard: Codable { - - public var cardType: String - public var firstName: String? - public var lastName: String? - - public init(cardType: String, firstName: String?, lastName: String?) { - self.cardType = cardType - self.firstName = firstName - self.lastName = lastName - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift deleted file mode 100644 index e11d38985a2e..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// PersonCardAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct PersonCardAllOf: Codable { - - public var firstName: String? - public var lastName: String? - - public init(firstName: String?, lastName: String?) { - self.firstName = firstName - self.lastName = lastName - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift deleted file mode 100644 index 0fd94cf83640..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// PlaceCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a card object for a Person derived from BaseCard. */ -public struct PlaceCard: Codable { - - public var cardType: String - public var placeName: String? - public var placeAddress: String? - - public init(cardType: String, placeName: String?, placeAddress: String?) { - self.cardType = cardType - self.placeName = placeName - self.placeAddress = placeAddress - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift deleted file mode 100644 index c5e89a15e00f..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// PlaceCardAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct PlaceCardAllOf: Codable { - - public var placeName: String? - public var placeAddress: String? - - public init(placeName: String?, placeAddress: String?) { - self.placeName = placeName - self.placeAddress = placeAddress - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift deleted file mode 100644 index 7d884d88e185..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// SampleBase.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a base class object from which other classes will derive. */ -public struct SampleBase: Codable { - - public var baseClassStringProp: String? - public var baseClassIntegerProp: Int? - - public init(baseClassStringProp: String?, baseClassIntegerProp: Int?) { - self.baseClassStringProp = baseClassStringProp - self.baseClassIntegerProp = baseClassIntegerProp - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift deleted file mode 100644 index c6ffc74a959d..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// SampleSubClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a subclass defived from the SampleBase class. */ -public struct SampleSubClass: Codable { - - public var baseClassStringProp: String? - public var baseClassIntegerProp: Int? - public var subClassStringProp: String? - public var subClassIntegerProp: Int? - - public init(baseClassStringProp: String?, baseClassIntegerProp: Int?, subClassStringProp: String?, subClassIntegerProp: Int?) { - self.baseClassStringProp = baseClassStringProp - self.baseClassIntegerProp = baseClassIntegerProp - self.subClassStringProp = subClassStringProp - self.subClassIntegerProp = subClassIntegerProp - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift deleted file mode 100644 index 7f52bb9fef4c..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// SampleSubClassAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SampleSubClassAllOf: Codable { - - public var subClassStringProp: String? - public var subClassIntegerProp: Int? - - public init(subClassStringProp: String?, subClassIntegerProp: Int?) { - self.subClassStringProp = subClassStringProp - self.subClassIntegerProp = subClassIntegerProp - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift deleted file mode 100644 index 48273ea2c2ce..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// StringEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum StringEnum: String, Codable, CaseIterable { - case stringenumvalue1 = "stringEnumValue1" - case stringenumvalue2 = "stringEnumValue2" - case stringenumvalue3 = "stringEnumValue3" -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift deleted file mode 100644 index 9b67f8a4af24..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// VariableNameTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 5 reserved words. */ -public struct VariableNameTest: Codable { - - /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */ - public var exampleName: String? - /** This property name is a reserved word in most languages, including Swift 5. */ - public var _for: String? - /** This model object property name should be unchanged from the JSON property name. */ - public var normalName: String? - - public init(exampleName: String?, _for: String?, normalName: String?) { - self.exampleName = exampleName - self._for = _for - self.normalName = normalName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case exampleName = "example_name" - case _for = "for" - case normalName - } - -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift deleted file mode 100644 index e06208074cd9..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// OpenISO8601DateFormatter.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -// https://stackoverflow.com/a/50281094/976628 -public class OpenISO8601DateFormatter: DateFormatter { - static let withoutSeconds: DateFormatter = { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" - return formatter - }() - - private func setup() { - calendar = Calendar(identifier: .iso8601) - locale = Locale(identifier: "en_US_POSIX") - timeZone = TimeZone(secondsFromGMT: 0) - dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - } - - override init() { - super.init() - setup() - } - - required init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - setup() - } - - override public func date(from string: String) -> Date? { - if let result = super.date(from: string) { - return result - } - return OpenISO8601DateFormatter.withoutSeconds.date(from: string) - } -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift deleted file mode 100644 index acf7ff4031bd..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift +++ /dev/null @@ -1,36 +0,0 @@ -// SynchronizedDictionary.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - internal subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } -} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift deleted file mode 100644 index e59109dc1fd0..000000000000 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ /dev/null @@ -1,589 +0,0 @@ -// URLSessionImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if !os(macOS) -import MobileCoreServices -#endif - -class URLSessionRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return URLSessionRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return URLSessionDecodableRequestBuilder.self - } -} - -// Store the URLSession to retain its reference -private var urlSessionStore = SynchronizedDictionary() - -open class URLSessionRequestBuilder: RequestBuilder { - - private var observation: NSKeyValueObservation? - - deinit { - observation?.invalidate() - } - - // swiftlint:disable:next weak_delegate - fileprivate let sessionDelegate = SessionDelegate() - - /** - May be assigned if you want to control the authentication challenges. - */ - public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the URLSession - configuration. - */ - open func createURLSession() -> URLSession { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - sessionDelegate.credential = credential - sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge - return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the URLRequest - configuration (e.g. to override the cache policy). - */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - - guard let url = URL(string: URLString) else { - throw DownloadException.requestMissingURL - } - - var originalRequest = URLRequest(url: url) - - originalRequest.httpMethod = method.rawValue - - buildHeaders().forEach { key, value in - originalRequest.setValue(value, forHTTPHeaderField: key) - } - - headers.forEach { key, value in - originalRequest.setValue(value, forHTTPHeaderField: key) - } - - let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - - return modifiedRequest - } - - override open func execute(_ apiResponseQueue: DispatchQueue = TestClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let urlSession = createURLSession() - urlSessionStore[urlSessionId] = urlSession - - let parameters: [String: Any] = self.parameters ?? [:] - - let fileKeys = parameters.filter { $1 is URL } - .map { $0.0 } - - let encoding: ParameterEncoding - if fileKeys.count > 0 { - encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if isBody { - encoding = JSONDataEncoding() - } else { - encoding = URLEncoding() - } - - guard let xMethod = HTTPMethod(rawValue: method) else { - fatalError("Unsuported Http method - \(method)") - } - - let cleanupRequest = { - urlSessionStore[urlSessionId] = nil - self.observation?.invalidate() - } - - do { - let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - - let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - - guard let self = self else { return } - - if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - - taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - - guard let self = self else { return } - - if shouldRetry { - cleanupRequest() - self.execute(apiResponseQueue, completion) - } else { - apiResponseQueue.async { - self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) - } - } - } - } else { - apiResponseQueue.async { - self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) - } - } - } - - if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { - onProgressReady?(dataTask.progress) - } - - dataTask.resume() - - } catch { - apiResponseQueue.async { - cleanupRequest() - completion(.failure(ErrorResponse.error(415, nil, error))) - } - } - - } - - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - - if let error = error { - completion(.failure(ErrorResponse.error(-1, data, error))) - return - } - - guard let httpResponse = response as? HTTPURLResponse else { - completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse))) - return - } - - guard httpResponse.isStatusCodeSuccessful else { - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode))) - return - } - - switch T.self { - case is String.Type: - - let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - - completion(.success(Response(response: httpResponse, body: body as? T))) - - case is URL.Type: - do { - - guard error == nil else { - throw DownloadException.responseFailed - } - - guard let data = data else { - throw DownloadException.responseDataMissing - } - - let fileManager = FileManager.default - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion(.success(Response(response: httpResponse, body: filePath as? T))) - - } catch let requestParserError as DownloadException { - completion(.failure(ErrorResponse.error(400, data, requestParserError))) - } catch let error { - completion(.failure(ErrorResponse.error(400, data, error))) - } - - case is Void.Type: - - completion(.success(Response(response: httpResponse, body: nil))) - - default: - - completion(.success(Response(response: httpResponse, body: data as? T))) - } - - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = TestClientAPI.customHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - - if let error = error { - completion(.failure(ErrorResponse.error(-1, data, error))) - return - } - - guard let httpResponse = response as? HTTPURLResponse else { - completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse))) - return - } - - guard httpResponse.isStatusCodeSuccessful else { - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode))) - return - } - - switch T.self { - case is String.Type: - - let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - - completion(.success(Response(response: httpResponse, body: body as? T))) - - case is Void.Type: - - completion(.success(Response(response: httpResponse, body: nil))) - - case is Data.Type: - - completion(.success(Response(response: httpResponse, body: data as? T))) - - default: - - guard let data = data, !data.isEmpty else { - completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) - return - } - - let decodeResult = CodableHelper.decode(T.self, from: data) - - switch decodeResult { - case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) - case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) - } - } - } -} - -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - - var credential: URLCredential? - - var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - - var credential: URLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else { - if challenge.previousFailureCount > 0 { - disposition = .rejectProtectionSpace - } else { - credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) - - if credential != nil { - disposition = .useCredential - } - } - } - - completionHandler(disposition, credential) - } -} - -public enum HTTPMethod: String { - case options = "OPTIONS" - case get = "GET" - case head = "HEAD" - case post = "POST" - case put = "PUT" - case patch = "PATCH" - case delete = "DELETE" - case trace = "TRACE" - case connect = "CONNECT" -} - -public protocol ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest -} - -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - - var urlRequest = urlRequest - - guard let parameters = parameters else { return urlRequest } - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { - urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) - urlRequest.url = urlComponents.url - } - - return urlRequest - } -} - -private class FileUploadEncoding: ParameterEncoding { - - let contentTypeForFormPart: (_ fileURL: URL) -> String? - - init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { - self.contentTypeForFormPart = contentTypeForFormPart - } - - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - - var urlRequest = urlRequest - - guard let parameters = parameters, !parameters.isEmpty else { - return urlRequest - } - - let boundary = "Boundary-\(UUID().uuidString)" - - urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") - - for (key, value) in parameters { - switch value { - case let fileURL as URL: - - urlRequest = try configureFileUploadRequest( - urlRequest: urlRequest, - boundary: boundary, - name: key, - fileURL: fileURL - ) - - case let string as String: - - if let data = string.data(using: .utf8) { - urlRequest = configureDataUploadRequest( - urlRequest: urlRequest, - boundary: boundary, - name: key, - data: data - ) - } - - case let number as NSNumber: - - if let data = number.stringValue.data(using: .utf8) { - urlRequest = configureDataUploadRequest( - urlRequest: urlRequest, - boundary: boundary, - name: key, - data: data - ) - } - - default: - fatalError("Unprocessable value \(value) with key \(key)") - } - } - - var body = urlRequest.httpBody.orEmpty - - body.append("\r\n--\(boundary)--\r\n") - - urlRequest.httpBody = body - - return urlRequest - } - - private func configureFileUploadRequest(urlRequest: URLRequest, boundary: String, name: String, fileURL: URL) throws -> URLRequest { - - var urlRequest = urlRequest - - var body = urlRequest.httpBody.orEmpty - - let fileData = try Data(contentsOf: fileURL) - - let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) - - let fileName = fileURL.lastPathComponent - - // If we already added something then we need an additional newline. - if body.count > 0 { - body.append("\r\n") - } - - // Value boundary. - body.append("--\(boundary)\r\n") - - // Value headers. - body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(fileName)\"\r\n") - body.append("Content-Type: \(mimetype)\r\n") - - // Separate headers and body. - body.append("\r\n") - - // The value data. - body.append(fileData) - - urlRequest.httpBody = body - - return urlRequest - } - - private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { - - var urlRequest = urlRequest - - var body = urlRequest.httpBody.orEmpty - - // If we already added something then we need an additional newline. - if body.count > 0 { - body.append("\r\n") - } - - // Value boundary. - body.append("--\(boundary)\r\n") - - // Value headers. - body.append("Content-Disposition: form-data; name=\"\(name)\"\r\n") - - // Separate headers and body. - body.append("\r\n") - - // The value data. - body.append(data) - - urlRequest.httpBody = body - - return urlRequest - - } - - func mimeType(for url: URL) -> String { - let pathExtension = url.pathExtension - - if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { - if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { - return mimetype as String - } - } - return "application/octet-stream" - } - -} - -fileprivate extension Data { - /// Append string to Data - /// - /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8. - /// - /// - parameter string: The string to be added to the `Data`. - - mutating func append(_ string: String) { - if let data = string.data(using: .utf8) { - append(data) - } - } -} - -fileprivate extension Optional where Wrapped == Data { - var orEmpty: Data { - self ?? Data() - } -} - -extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/test/swift5/default/TestClientApp/.gitignore b/samples/client/test/swift5/default/TestClientApp/.gitignore deleted file mode 100644 index 0269c2f56db9..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/.gitignore +++ /dev/null @@ -1,72 +0,0 @@ -### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output - - diff --git a/samples/client/test/swift5/default/TestClientApp/Podfile b/samples/client/test/swift5/default/TestClientApp/Podfile deleted file mode 100644 index 4c786a266c9a..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/Podfile +++ /dev/null @@ -1,13 +0,0 @@ -platform :ios, '9.0' - -source 'https://cdn.cocoapods.org/' - -use_frameworks! - -target 'TestClientApp' do - pod "TestClient", :path => "../" - - target 'TestClientAppTests' do - inherit! :search_paths - end -end diff --git a/samples/client/test/swift5/default/TestClientApp/Podfile.lock b/samples/client/test/swift5/default/TestClientApp/Podfile.lock deleted file mode 100644 index a22ff8bcb6f4..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/Podfile.lock +++ /dev/null @@ -1,16 +0,0 @@ -PODS: - - TestClient (1.0) - -DEPENDENCIES: - - TestClient (from `../`) - -EXTERNAL SOURCES: - TestClient: - :path: "../" - -SPEC CHECKSUMS: - TestClient: 2c0d16f42076221adbf579221827fd034c3c4a85 - -PODFILE CHECKSUM: 837b06bfc9f93ccd7664fd918d113c8e3824bde3 - -COCOAPODS: 1.8.4 diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj deleted file mode 100644 index 0df5e64abe9b..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj +++ /dev/null @@ -1,546 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 38F9390AFCDA262FB068DF15 /* Pods_TestClientApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */; }; - C1ADDA787241158A360D054C /* Pods_TestClientAppTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */; }; - FDC99C781F1E832E000EB08F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C771F1E832E000EB08F /* AppDelegate.swift */; }; - FDC99C7A1F1E832E000EB08F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C791F1E832E000EB08F /* ViewController.swift */; }; - FDC99C7D1F1E832E000EB08F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C7B1F1E832E000EB08F /* Main.storyboard */; }; - FDC99C7F1F1E832E000EB08F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C7E1F1E832E000EB08F /* Assets.xcassets */; }; - FDC99C821F1E832E000EB08F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */; }; - FDC99C8D1F1E832E000EB08F /* TestClientAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - FDC99C891F1E832E000EB08F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = FDC99C6C1F1E832D000EB08F /* Project object */; - proxyType = 1; - remoteGlobalIDString = FDC99C731F1E832D000EB08F; - remoteInfo = TestClientApp; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientAppTests.release.xcconfig"; path = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig"; sourceTree = ""; }; - 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientAppTests.debug.xcconfig"; path = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig"; sourceTree = ""; }; - 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestClientAppTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestClientApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientApp.debug.xcconfig"; path = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig"; sourceTree = ""; }; - FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientApp.release.xcconfig"; path = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig"; sourceTree = ""; }; - FDC99C741F1E832E000EB08F /* TestClientApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestClientApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; - FDC99C771F1E832E000EB08F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - FDC99C791F1E832E000EB08F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - FDC99C7C1F1E832E000EB08F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - FDC99C7E1F1E832E000EB08F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - FDC99C811F1E832E000EB08F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - FDC99C831F1E832E000EB08F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestClientAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestClientAppTests.swift; sourceTree = ""; }; - FDC99C8E1F1E832E000EB08F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - FDC99C711F1E832D000EB08F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 38F9390AFCDA262FB068DF15 /* Pods_TestClientApp.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FDC99C851F1E832E000EB08F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C1ADDA787241158A360D054C /* Pods_TestClientAppTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 14E10881047978AE906EB19F /* Frameworks */ = { - isa = PBXGroup; - children = ( - A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */, - 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - CF51681F23C24C36AAED2CE8 /* Pods */ = { - isa = PBXGroup; - children = ( - F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */, - FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */, - 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */, - 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - FDC99C6B1F1E832D000EB08F = { - isa = PBXGroup; - children = ( - FDC99C761F1E832E000EB08F /* TestClientApp */, - FDC99C8B1F1E832E000EB08F /* TestClientAppTests */, - FDC99C751F1E832E000EB08F /* Products */, - CF51681F23C24C36AAED2CE8 /* Pods */, - 14E10881047978AE906EB19F /* Frameworks */, - ); - sourceTree = ""; - }; - FDC99C751F1E832E000EB08F /* Products */ = { - isa = PBXGroup; - children = ( - FDC99C741F1E832E000EB08F /* TestClientApp.app */, - FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - FDC99C761F1E832E000EB08F /* TestClientApp */ = { - isa = PBXGroup; - children = ( - FDC99C771F1E832E000EB08F /* AppDelegate.swift */, - FDC99C791F1E832E000EB08F /* ViewController.swift */, - FDC99C7B1F1E832E000EB08F /* Main.storyboard */, - FDC99C7E1F1E832E000EB08F /* Assets.xcassets */, - FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */, - FDC99C831F1E832E000EB08F /* Info.plist */, - ); - path = TestClientApp; - sourceTree = ""; - }; - FDC99C8B1F1E832E000EB08F /* TestClientAppTests */ = { - isa = PBXGroup; - children = ( - FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */, - FDC99C8E1F1E832E000EB08F /* Info.plist */, - ); - path = TestClientAppTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - FDC99C731F1E832D000EB08F /* TestClientApp */ = { - isa = PBXNativeTarget; - buildConfigurationList = FDC99C911F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientApp" */; - buildPhases = ( - 49D4BFD3E4300757B94A1108 /* [CP] Check Pods Manifest.lock */, - FDC99C701F1E832D000EB08F /* Sources */, - FDC99C711F1E832D000EB08F /* Frameworks */, - FDC99C721F1E832D000EB08F /* Resources */, - 963B093FCC81F62B36EB9CB5 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TestClientApp; - productName = TestClientApp; - productReference = FDC99C741F1E832E000EB08F /* TestClientApp.app */; - productType = "com.apple.product-type.application"; - }; - FDC99C871F1E832E000EB08F /* TestClientAppTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = FDC99C941F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientAppTests" */; - buildPhases = ( - 29B2A5322E23310EC5D6B2DD /* [CP] Check Pods Manifest.lock */, - FDC99C841F1E832E000EB08F /* Sources */, - FDC99C851F1E832E000EB08F /* Frameworks */, - FDC99C861F1E832E000EB08F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - FDC99C8A1F1E832E000EB08F /* PBXTargetDependency */, - ); - name = TestClientAppTests; - productName = TestClientAppTests; - productReference = FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - FDC99C6C1F1E832D000EB08F /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; - ORGANIZATIONNAME = "Swagger Codegen"; - TargetAttributes = { - FDC99C731F1E832D000EB08F = { - CreatedOnToolsVersion = 9.0; - }; - FDC99C871F1E832E000EB08F = { - CreatedOnToolsVersion = 9.0; - TestTargetID = FDC99C731F1E832D000EB08F; - }; - }; - }; - buildConfigurationList = FDC99C6F1F1E832D000EB08F /* Build configuration list for PBXProject "TestClientApp" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = FDC99C6B1F1E832D000EB08F; - productRefGroup = FDC99C751F1E832E000EB08F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - FDC99C731F1E832D000EB08F /* TestClientApp */, - FDC99C871F1E832E000EB08F /* TestClientAppTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - FDC99C721F1E832D000EB08F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FDC99C821F1E832E000EB08F /* LaunchScreen.storyboard in Resources */, - FDC99C7F1F1E832E000EB08F /* Assets.xcassets in Resources */, - FDC99C7D1F1E832E000EB08F /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FDC99C861F1E832E000EB08F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 29B2A5322E23310EC5D6B2DD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TestClientAppTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 49D4BFD3E4300757B94A1108 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TestClientApp-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 963B093FCC81F62B36EB9CB5 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/TestClient/TestClient.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TestClient.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - FDC99C701F1E832D000EB08F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FDC99C7A1F1E832E000EB08F /* ViewController.swift in Sources */, - FDC99C781F1E832E000EB08F /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FDC99C841F1E832E000EB08F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FDC99C8D1F1E832E000EB08F /* TestClientAppTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - FDC99C8A1F1E832E000EB08F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = FDC99C731F1E832D000EB08F /* TestClientApp */; - targetProxy = FDC99C891F1E832E000EB08F /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - FDC99C7B1F1E832E000EB08F /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - FDC99C7C1F1E832E000EB08F /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - FDC99C811F1E832E000EB08F /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - FDC99C8F1F1E832E000EB08F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - FDC99C901F1E832E000EB08F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - FDC99C921F1E832E000EB08F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 82A2S5FGTA; - INFOPLIST_FILE = TestClientApp/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - FDC99C931F1E832E000EB08F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 82A2S5FGTA; - INFOPLIST_FILE = TestClientApp/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - FDC99C951F1E832E000EB08F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 82A2S5FGTA; - INFOPLIST_FILE = TestClientAppTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientAppTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestClientApp.app/TestClientApp"; - }; - name = Debug; - }; - FDC99C961F1E832E000EB08F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 82A2S5FGTA; - INFOPLIST_FILE = TestClientAppTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientAppTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestClientApp.app/TestClientApp"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - FDC99C6F1F1E832D000EB08F /* Build configuration list for PBXProject "TestClientApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC99C8F1F1E832E000EB08F /* Debug */, - FDC99C901F1E832E000EB08F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - FDC99C911F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC99C921F1E832E000EB08F /* Debug */, - FDC99C931F1E832E000EB08F /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; - FDC99C941F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientAppTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC99C951F1E832E000EB08F /* Debug */, - FDC99C961F1E832E000EB08F /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = FDC99C6C1F1E832D000EB08F /* Project object */; -} diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 8a25971ab6b7..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index ad74fb61eb23..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/AppDelegate.swift b/samples/client/test/swift5/default/TestClientApp/TestClientApp/AppDelegate.swift deleted file mode 100644 index f8a7b948d85c..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp/AppDelegate.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// AppDelegate.swift -// TestClientApp -// -// Created by Eric Hyche on 7/18/17. -// Copyright © 2017 Swagger Codegen. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - -} diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 1d060ed28827..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 5654142a8abc..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard deleted file mode 100644 index 7ef2ecfcfd93..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Info.plist b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Info.plist deleted file mode 100644 index 16be3b681122..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/ViewController.swift b/samples/client/test/swift5/default/TestClientApp/TestClientApp/ViewController.swift deleted file mode 100644 index a5f289c421f1..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientApp/ViewController.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ViewController.swift -// TestClientApp -// -// Created by Eric Hyche on 7/18/17. -// Copyright © 2017 Swagger Codegen. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/Info.plist b/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/Info.plist deleted file mode 100644 index 6c40a6cd0c4a..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift b/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift deleted file mode 100644 index 42dd587fe008..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// TestClientAppTests.swift -// TestClientAppTests -// -// Created by Eric Hyche on 7/18/17. -// Copyright © 2017 Swagger Codegen. All rights reserved. -// - -import XCTest -import TestClient -@testable import TestClientApp - -class TestClientAppTests: XCTestCase { - - func testWhenVariableNameIsDifferentFromPropertyName() throws { - // This tests to make sure that the swift4 language can handle when - // we have property names which map to variable names that are not the same. - // This can happen when we have things like snake_case property names, - // or when we have property names which may be Swift 4 reserved words. - let jsonData = """ - { - "example_name": "Test example name", - "for": "Some reason", - "normalName": "Some normal name value" - } - """.data(using: .utf8)! - - let decodedResult = CodableHelper.decode(VariableNameTest.self, from: jsonData) - let variableNameTest = try decodedResult.get() - - XCTAssertTrue(variableNameTest.exampleName == "Test example name", "Did not decode snake_case property correctly.") - XCTAssertTrue(variableNameTest._for == "Some reason", "Did not decode property name that is a reserved word correctly.") - } - -} diff --git a/samples/client/test/swift5/default/TestClientApp/pom.xml b/samples/client/test/swift5/default/TestClientApp/pom.xml deleted file mode 100644 index fdb3db1495bb..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4TestClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Test Schema Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_xcodebuild.sh - - - - - - - diff --git a/samples/client/test/swift5/default/TestClientApp/run_xcodebuild.sh b/samples/client/test/swift5/default/TestClientApp/run_xcodebuild.sh deleted file mode 100755 index 060ec332217e..000000000000 --- a/samples/client/test/swift5/default/TestClientApp/run_xcodebuild.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -pod install - -xcodebuild clean build build-for-testing -workspace "TestClientApp.xcworkspace" -scheme "TestClientApp" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max,OS=latest" && xcodebuild test-without-building -workspace "TestClientApp.xcworkspace" -scheme "TestClientAppTests" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/test/swift5/default/docs/AllPrimitives.md b/samples/client/test/swift5/default/docs/AllPrimitives.md deleted file mode 100644 index 1cfa94eaf73b..000000000000 --- a/samples/client/test/swift5/default/docs/AllPrimitives.md +++ /dev/null @@ -1,34 +0,0 @@ -# AllPrimitives - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myInteger** | **Int** | | [optional] -**myIntegerArray** | **[Int]** | | [optional] -**myLong** | **Int64** | | [optional] -**myLongArray** | **[Int64]** | | [optional] -**myFloat** | **Float** | | [optional] -**myFloatArray** | **[Float]** | | [optional] -**myDouble** | **Double** | | [optional] -**myDoubleArray** | **[Double]** | | [optional] -**myString** | **String** | | [optional] -**myStringArray** | **[String]** | | [optional] -**myBytes** | **Data** | | [optional] -**myBytesArray** | **[Data]** | | [optional] -**myBoolean** | **Bool** | | [optional] -**myBooleanArray** | **[Bool]** | | [optional] -**myDate** | **Date** | | [optional] -**myDateArray** | **[Date]** | | [optional] -**myDateTime** | **Date** | | [optional] -**myDateTimeArray** | **[Date]** | | [optional] -**myFile** | **URL** | | [optional] -**myFileArray** | **[URL]** | | [optional] -**myUUID** | **UUID** | | [optional] -**myUUIDArray** | **[UUID]** | | [optional] -**myStringEnum** | [**StringEnum**](StringEnum.md) | | [optional] -**myStringEnumArray** | [StringEnum] | | [optional] -**myInlineStringEnum** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/BaseCard.md b/samples/client/test/swift5/default/docs/BaseCard.md deleted file mode 100644 index 42d41b7db138..000000000000 --- a/samples/client/test/swift5/default/docs/BaseCard.md +++ /dev/null @@ -1,10 +0,0 @@ -# BaseCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cardType** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/ErrorInfo.md b/samples/client/test/swift5/default/docs/ErrorInfo.md deleted file mode 100644 index 5cc21d73ae18..000000000000 --- a/samples/client/test/swift5/default/docs/ErrorInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**message** | **String** | | [optional] -**details** | **[String]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/GetAllModelsResult.md b/samples/client/test/swift5/default/docs/GetAllModelsResult.md deleted file mode 100644 index 4de449547ae1..000000000000 --- a/samples/client/test/swift5/default/docs/GetAllModelsResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAllModelsResult - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myPrimitiveArray** | [AllPrimitives] | | [optional] -**myPrimitive** | [**AllPrimitives**](AllPrimitives.md) | | [optional] -**myVariableNameTest** | [**VariableNameTest**](VariableNameTest.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/ModelDoubleArray.md b/samples/client/test/swift5/default/docs/ModelDoubleArray.md deleted file mode 100644 index 46a1e87a9ce2..000000000000 --- a/samples/client/test/swift5/default/docs/ModelDoubleArray.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelDoubleArray - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/ModelErrorInfoArray.md b/samples/client/test/swift5/default/docs/ModelErrorInfoArray.md deleted file mode 100644 index 666ca4ccc0ed..000000000000 --- a/samples/client/test/swift5/default/docs/ModelErrorInfoArray.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelErrorInfoArray - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/ModelStringArray.md b/samples/client/test/swift5/default/docs/ModelStringArray.md deleted file mode 100644 index a84e8f1d4bb5..000000000000 --- a/samples/client/test/swift5/default/docs/ModelStringArray.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelStringArray - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/ModelWithIntAdditionalPropertiesOnly.md b/samples/client/test/swift5/default/docs/ModelWithIntAdditionalPropertiesOnly.md deleted file mode 100644 index 209683e4fdf0..000000000000 --- a/samples/client/test/swift5/default/docs/ModelWithIntAdditionalPropertiesOnly.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelWithIntAdditionalPropertiesOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/ModelWithPropertiesAndAdditionalProperties.md b/samples/client/test/swift5/default/docs/ModelWithPropertiesAndAdditionalProperties.md deleted file mode 100644 index 098c03d68827..000000000000 --- a/samples/client/test/swift5/default/docs/ModelWithPropertiesAndAdditionalProperties.md +++ /dev/null @@ -1,17 +0,0 @@ -# ModelWithPropertiesAndAdditionalProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myIntegerReq** | **Int** | | -**myIntegerOpt** | **Int** | | [optional] -**myPrimitiveReq** | [**AllPrimitives**](AllPrimitives.md) | | -**myPrimitiveOpt** | [**AllPrimitives**](AllPrimitives.md) | | [optional] -**myStringArrayReq** | **[String]** | | -**myStringArrayOpt** | **[String]** | | [optional] -**myPrimitiveArrayReq** | [AllPrimitives] | | -**myPrimitiveArrayOpt** | [AllPrimitives] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/ModelWithStringAdditionalPropertiesOnly.md b/samples/client/test/swift5/default/docs/ModelWithStringAdditionalPropertiesOnly.md deleted file mode 100644 index ca910111612d..000000000000 --- a/samples/client/test/swift5/default/docs/ModelWithStringAdditionalPropertiesOnly.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelWithStringAdditionalPropertiesOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/PersonCard.md b/samples/client/test/swift5/default/docs/PersonCard.md deleted file mode 100644 index 385299f87686..000000000000 --- a/samples/client/test/swift5/default/docs/PersonCard.md +++ /dev/null @@ -1,11 +0,0 @@ -# PersonCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/PersonCardAllOf.md b/samples/client/test/swift5/default/docs/PersonCardAllOf.md deleted file mode 100644 index e4b78f76c9eb..000000000000 --- a/samples/client/test/swift5/default/docs/PersonCardAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# PersonCardAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/PlaceCard.md b/samples/client/test/swift5/default/docs/PlaceCard.md deleted file mode 100644 index 87002357ce02..000000000000 --- a/samples/client/test/swift5/default/docs/PlaceCard.md +++ /dev/null @@ -1,11 +0,0 @@ -# PlaceCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**placeName** | **String** | | [optional] -**placeAddress** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/PlaceCardAllOf.md b/samples/client/test/swift5/default/docs/PlaceCardAllOf.md deleted file mode 100644 index 5ed8d8a4d0e9..000000000000 --- a/samples/client/test/swift5/default/docs/PlaceCardAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# PlaceCardAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**placeName** | **String** | | [optional] -**placeAddress** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/SampleBase.md b/samples/client/test/swift5/default/docs/SampleBase.md deleted file mode 100644 index a7c7ac9722db..000000000000 --- a/samples/client/test/swift5/default/docs/SampleBase.md +++ /dev/null @@ -1,11 +0,0 @@ -# SampleBase - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**baseClassStringProp** | **String** | | [optional] -**baseClassIntegerProp** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/SampleSubClass.md b/samples/client/test/swift5/default/docs/SampleSubClass.md deleted file mode 100644 index 435633ccde1c..000000000000 --- a/samples/client/test/swift5/default/docs/SampleSubClass.md +++ /dev/null @@ -1,13 +0,0 @@ -# SampleSubClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**baseClassStringProp** | **String** | | [optional] -**baseClassIntegerProp** | **Int** | | [optional] -**subClassStringProp** | **String** | | [optional] -**subClassIntegerProp** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/SampleSubClassAllOf.md b/samples/client/test/swift5/default/docs/SampleSubClassAllOf.md deleted file mode 100644 index 50a64944e82b..000000000000 --- a/samples/client/test/swift5/default/docs/SampleSubClassAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# SampleSubClassAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**subClassStringProp** | **String** | | [optional] -**subClassIntegerProp** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/StringEnum.md b/samples/client/test/swift5/default/docs/StringEnum.md deleted file mode 100644 index b0009f7e8269..000000000000 --- a/samples/client/test/swift5/default/docs/StringEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/docs/Swift5TestAPI.md b/samples/client/test/swift5/default/docs/Swift5TestAPI.md deleted file mode 100644 index fde288b3946b..000000000000 --- a/samples/client/test/swift5/default/docs/Swift5TestAPI.md +++ /dev/null @@ -1,59 +0,0 @@ -# Swift5TestAPI - -All URIs are relative to *http://api.example.com/basePath* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getAllModels**](Swift5TestAPI.md#getallmodels) | **GET** /allModels | Get all of the models - - -# **getAllModels** -```swift - open class func getAllModels(clientId: String, completion: @escaping (_ data: GetAllModelsResult?, _ error: Error?) -> Void) -``` - -Get all of the models - -This endpoint tests get a dictionary which contains examples of all of the models. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import TestClient - -let clientId = "clientId_example" // String | id that represent the Api client - -// Get all of the models -Swift5TestAPI.getAllModels(clientId: clientId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **String** | id that represent the Api client | - -### Return type - -[**GetAllModelsResult**](GetAllModelsResult.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/test/swift5/default/docs/VariableNameTest.md b/samples/client/test/swift5/default/docs/VariableNameTest.md deleted file mode 100644 index b99011e0a9ea..000000000000 --- a/samples/client/test/swift5/default/docs/VariableNameTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# VariableNameTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**exampleName** | **String** | This snake-case examle_name property name should be converted to a camelCase variable name like exampleName | [optional] -**_for** | **String** | This property name is a reserved word in most languages, including Swift 5. | [optional] -**normalName** | **String** | This model object property name should be unchanged from the JSON property name. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift5/default/git_push.sh b/samples/client/test/swift5/default/git_push.sh deleted file mode 100644 index ced3be2b0c7b..000000000000 --- a/samples/client/test/swift5/default/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/test/swift5/default/pom.xml b/samples/client/test/swift5/default/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/test/swift5/default/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/test/swift5/default/project.yml b/samples/client/test/swift5/default/project.yml deleted file mode 100644 index c5d75afe8c0a..000000000000 --- a/samples/client/test/swift5/default/project.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: TestClient -targets: - TestClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [TestClient] - info: - path: ./Info.plist - version: 1.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - diff --git a/samples/client/test/swift5/default/run_spmbuild.sh b/samples/client/test/swift5/default/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/test/swift5/default/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/test/swift5/swift5_test_all.sh b/samples/client/test/swift5/swift5_test_all.sh deleted file mode 100755 index dcb30d887c91..000000000000 --- a/samples/client/test/swift5/swift5_test_all.sh +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/bash - -set -e - -DIRECTORY=`dirname $0` - -# example project with unit tests -mvn -f $DIRECTORY/default/TestClientApp/pom.xml integration-test - -# spm build -mvn -f $DIRECTORY/default/pom.xml integration-test From 67158a0fd1a4952e39c4cb4862679d2b9cbcb94e Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@gmail.com> Date: Mon, 28 Dec 2020 12:38:25 +0000 Subject: [PATCH 2/3] [swift] update bitrise.yml --- CI/bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/bitrise.yml b/CI/bitrise.yml index 9cd052310171..f3bf6fec4c91 100644 --- a/CI/bitrise.yml +++ b/CI/bitrise.yml @@ -47,5 +47,5 @@ workflows: set -e - ./samples/client/test/swift5/swift5_test_all.sh + ./samples/client/petstore/swift5/swift5_test_all.sh From d27d505b1a2479ecc443fb8fb8ed6fbb8e0e9433 Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@gmail.com> Date: Fri, 1 Jan 2021 11:35:25 +0000 Subject: [PATCH 3/3] [swift] update unit tests --- pom.xml | 5 +++-- samples/client/petstore/swift5/swift5_test_all.sh | 13 +++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index ff2d86119fa8..9063b173a71a 100644 --- a/pom.xml +++ b/pom.xml @@ -1442,17 +1442,18 @@ samples/client/petstore/swift5/rxswiftLibrary samples/client/petstore/swift5/urlsessionLibrary + + --> +