mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
[ObjC] AFNetworking pinnedCertificates API usage fix (#4143)
* Fixed afnetworking API usage: pinnedCertificates now declared as NSSet, not as NSArray * Petstore updated
This commit is contained in:
commit
07bec36deb
@ -483,7 +483,7 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response)
|
||||
|
||||
if (config.sslCaCert) {
|
||||
NSData *certData = [NSData dataWithContentsOfFile:config.sslCaCert];
|
||||
[securityPolicy setPinnedCertificates:@[certData]];
|
||||
[securityPolicy setPinnedCertificates:[NSSet setWithObject:certData]];
|
||||
}
|
||||
|
||||
if (config.verifySSL) {
|
||||
|
@ -30,7 +30,7 @@ Pod::Spec.new do |s|
|
||||
s.public_header_files = '{{podName}}/**/*.h'
|
||||
{{#useCoreData}} s.resources = '{{podName}}/**/*.{xcdatamodeld,xcdatamodel}'{{/useCoreData}}
|
||||
|
||||
s.dependency 'AFNetworking', '~> 3'
|
||||
s.dependency 'AFNetworking', '~> 3.1'
|
||||
s.dependency 'JSONModel', '~> 1.4'
|
||||
s.dependency 'ISO8601', '~> 0.5'
|
||||
end
|
||||
|
@ -30,7 +30,7 @@ Pod::Spec.new do |s|
|
||||
s.public_header_files = 'SwaggerClient/**/*.h'
|
||||
|
||||
|
||||
s.dependency 'AFNetworking', '~> 3'
|
||||
s.dependency 'AFNetworking', '~> 3.1'
|
||||
s.dependency 'JSONModel', '~> 1.2'
|
||||
s.dependency 'ISO8601', '~> 0.5'
|
||||
end
|
||||
|
@ -483,7 +483,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
|
||||
|
||||
if (config.sslCaCert) {
|
||||
NSData *certData = [NSData dataWithContentsOfFile:config.sslCaCert];
|
||||
[securityPolicy setPinnedCertificates:@[certData]];
|
||||
[securityPolicy setPinnedCertificates:[NSSet setWithObject:certData]];
|
||||
}
|
||||
|
||||
if (config.verifySSL) {
|
||||
|
Loading…
Reference in New Issue
Block a user