Skip to content

Commit f30d4b0

Browse files
committed
Migrate PetStore to Swift 4.2
The last version was Swift 3.0 which is very old. The project had some compile errors and was not working at all with Xcode 10. Some changes are generated by Cocoapods using the latest version. Manual fixes are done only for the .swift files
1 parent 552bdf5 commit f30d4b0

File tree

20 files changed

+860
-695
lines changed

20 files changed

+860
-695
lines changed

samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ open class FakeClassnameTags123API {
4545
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
4646

4747
var url = URLComponents(string: URLString)
48-
url?.queryItems = APIHelper.mapValuesToQueryItems([
49-
])
48+
url?.queryItems = APIHelper.mapValuesToQueryItems([:])
5049

5150
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
5251

samples/client/petstore/swift4/default/SwaggerClientTests/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212
post_install do |installer|
1313
installer.pods_project.targets.each do |target|
1414
target.build_configurations.each do |configuration|
15-
configuration.build_settings['SWIFT_VERSION'] = "3.0"
15+
configuration.build_settings['SWIFT_VERSION'] = "4.2"
1616
end
1717
end
1818
end

samples/client/petstore/swift4/default/SwaggerClientTests/Podfile.lock

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ PODS:
66
DEPENDENCIES:
77
- PetstoreClient (from `../`)
88

9+
SPEC REPOS:
10+
https://github.com/cocoapods/specs.git:
11+
- Alamofire
12+
913
EXTERNAL SOURCES:
1014
PetstoreClient:
11-
:path: ../
15+
:path: "../"
1216

1317
SPEC CHECKSUMS:
1418
Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140
15-
PetstoreClient: fef7934ac90bd28c2b81cc5234615112f9ace5f5
19+
PetstoreClient: 9f1c86c3f7194758e922fb64277bfb4fc60bbf20
1620

17-
PODFILE CHECKSUM: 417049e9ed0e4680602b34d838294778389bd418
21+
PODFILE CHECKSUM: 065fc3a3ec186d4f60ef8c7d9624786f07955f2f
1822

19-
COCOAPODS: 1.4.0
23+
COCOAPODS: 1.7.1

samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Manifest.lock

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 651 additions & 604 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-Info.plist

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-Info.plist

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)