From 500f41902eb295a4a585657c945deb31360729c9 Mon Sep 17 00:00:00 2001 From: Wolfgang Berger Date: Tue, 16 Aug 2016 15:15:23 +0200 Subject: [PATCH 001/182] Feature/objc tasks 2.3.0 (#3522) * change api and ApiClient to return cancellable NSURLSessionTasks instead of NSNumber * define a configuration protocol for custom configurations, which can be passed to api clients instead of a global configuration, provide a default implementation with a singleton option * integrate a workaround for a current JSONModel concurrency bug * update to new ISO8601 pod * add missing call to super * integrate new templates into codegen * updates documentation templates * updates petstore objc generated code * fixes objc client tests --- .../codegen/languages/ObjcClientCodegen.java | 11 +- .../resources/objc/ApiClient-body.mustache | 201 +- .../resources/objc/ApiClient-header.mustache | 95 +- .../objc/BasicAuthTokenProvider-body.mustache | 19 + .../BasicAuthTokenProvider-header.mustache | 14 + .../objc/Configuration-protocol.mustache | 75 + ...che => DefaultConfiguration-body.mustache} | 41 +- ...e => DefaultConfiguration-header.mustache} | 11 +- ...JSONValueTransformer+ISO8601-body.mustache | 1 + ...ONValueTransformer+ISO8601-header.mustache | 1 - .../main/resources/objc/Object-body.mustache | 29 + .../objc/QueryParamCollection-body.mustache | 12 +- .../src/main/resources/objc/README.mustache | 4 +- .../src/main/resources/objc/api-body.mustache | 34 +- .../main/resources/objc/api-header.mustache | 4 +- .../main/resources/objc/api-protocol.mustache | 6 +- .../src/main/resources/objc/api_doc.mustache | 4 +- .../src/main/resources/objc/podspec.mustache | 2 +- .../client/petstore/objc/core-data/README.md | 18 +- .../objc/core-data/SwaggerClient.podspec | 2 +- .../core-data/SwaggerClient/Api/SWGPetApi.h | 18 +- .../core-data/SwaggerClient/Api/SWGPetApi.m | 71 +- .../core-data/SwaggerClient/Api/SWGStoreApi.h | 10 +- .../core-data/SwaggerClient/Api/SWGStoreApi.m | 49 +- .../core-data/SwaggerClient/Api/SWGUserApi.h | 18 +- .../core-data/SwaggerClient/Api/SWGUserApi.m | 69 +- .../Core/JSONValueTransformer+ISO8601.h | 1 - .../Core/JSONValueTransformer+ISO8601.m | 1 + .../core-data/SwaggerClient/Core/SWGApi.h | 6 +- .../SwaggerClient/Core/SWGApiClient.h | 99 +- .../SwaggerClient/Core/SWGApiClient.m | 201 +- .../Core/SWGBasicAuthTokenProvider.h | 14 + .../Core/SWGBasicAuthTokenProvider.m | 19 + .../SwaggerClient/Core/SWGConfiguration.h | 119 +- .../Core/SWGDefaultConfiguration.h | 175 ++ ...figuration.m => SWGDefaultConfiguration.m} | 55 +- .../core-data/SwaggerClient/Core/SWGObject.m | 29 + .../Core/SWGQueryParamCollection.m | 12 +- .../SwaggerClient.xcodeproj/project.pbxproj | 2061 ++++++++++----- .../SwaggerClient/SWGViewController.m | 4 +- .../client/petstore/objc/default/README.md | 18 +- .../objc/default/SwaggerClient.podspec | 2 +- .../default/SwaggerClient/Api/SWGPetApi.h | 18 +- .../default/SwaggerClient/Api/SWGPetApi.m | 71 +- .../default/SwaggerClient/Api/SWGStoreApi.h | 10 +- .../default/SwaggerClient/Api/SWGStoreApi.m | 49 +- .../default/SwaggerClient/Api/SWGUserApi.h | 18 +- .../default/SwaggerClient/Api/SWGUserApi.m | 69 +- .../Core/JSONValueTransformer+ISO8601.h | 1 - .../Core/JSONValueTransformer+ISO8601.m | 1 + .../objc/default/SwaggerClient/Core/SWGApi.h | 6 +- .../default/SwaggerClient/Core/SWGApiClient.h | 99 +- .../default/SwaggerClient/Core/SWGApiClient.m | 201 +- .../Core/SWGBasicAuthTokenProvider.h | 14 + .../Core/SWGBasicAuthTokenProvider.m | 19 + .../SwaggerClient/Core/SWGConfiguration.h | 119 +- .../Core/SWGDefaultConfiguration.h | 175 ++ ...figuration.m => SWGDefaultConfiguration.m} | 55 +- .../default/SwaggerClient/Core/SWGObject.m | 29 + .../Core/SWGQueryParamCollection.m | 12 +- .../SwaggerClient.xcodeproj/project.pbxproj | 2215 ++++++++++++----- .../SwaggerClient/SWGViewController.m | 4 +- .../Tests/SWGApiClientTest.m | 7 +- .../petstore/objc/default/docs/SWGPetApi.md | 40 +- .../petstore/objc/default/docs/SWGStoreApi.md | 10 +- .../petstore/objc/default/docs/SWGUserApi.md | 16 +- 66 files changed, 4367 insertions(+), 2526 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/objc/BasicAuthTokenProvider-body.mustache create mode 100644 modules/swagger-codegen/src/main/resources/objc/BasicAuthTokenProvider-header.mustache create mode 100644 modules/swagger-codegen/src/main/resources/objc/Configuration-protocol.mustache rename modules/swagger-codegen/src/main/resources/objc/{Configuration-body.mustache => DefaultConfiguration-body.mustache} (73%) rename modules/swagger-codegen/src/main/resources/objc/{Configuration-header.mustache => DefaultConfiguration-header.mustache} (92%) create mode 100644 samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGBasicAuthTokenProvider.h create mode 100644 samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGBasicAuthTokenProvider.m create mode 100644 samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h rename samples/client/petstore/objc/core-data/SwaggerClient/Core/{SWGConfiguration.m => SWGDefaultConfiguration.m} (72%) create mode 100644 samples/client/petstore/objc/default/SwaggerClient/Core/SWGBasicAuthTokenProvider.h create mode 100644 samples/client/petstore/objc/default/SwaggerClient/Core/SWGBasicAuthTokenProvider.m create mode 100644 samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h rename samples/client/petstore/objc/default/SwaggerClient/Core/{SWGConfiguration.m => SWGDefaultConfiguration.m} (72%) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java index d8b20ae5dd0..a9d827fd1a5 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java @@ -245,8 +245,8 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("Object-body.mustache", coreFileFolder(), classPrefix + "Object.m")); supportingFiles.add(new SupportingFile("QueryParamCollection-header.mustache", coreFileFolder(), classPrefix + "QueryParamCollection.h")); supportingFiles.add(new SupportingFile("QueryParamCollection-body.mustache", coreFileFolder(), classPrefix + "QueryParamCollection.m")); - supportingFiles.add(new SupportingFile("ApiClient-header.mustache", coreFileFolder(), classPrefix + "ApiClient.h")); - supportingFiles.add(new SupportingFile("ApiClient-body.mustache", coreFileFolder(), classPrefix + "ApiClient.m")); + supportingFiles.add(new SupportingFile("ApiClient-header.mustache", coreFileFolder(), classPrefix + "ApiClient.h")); + supportingFiles.add(new SupportingFile("ApiClient-body.mustache", coreFileFolder(), classPrefix + "ApiClient.m")); supportingFiles.add(new SupportingFile("JSONResponseSerializer-header.mustache", coreFileFolder(), classPrefix + "JSONResponseSerializer.h")); supportingFiles.add(new SupportingFile("JSONResponseSerializer-body.mustache", coreFileFolder(), classPrefix + "JSONResponseSerializer.m")); supportingFiles.add(new SupportingFile("JSONRequestSerializer-body.mustache", coreFileFolder(), classPrefix + "JSONRequestSerializer.m")); @@ -259,8 +259,11 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("Logger-header.mustache", coreFileFolder(), classPrefix + "Logger.h")); supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601-body.mustache", coreFileFolder(), "JSONValueTransformer+ISO8601.m")); supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601-header.mustache", coreFileFolder(), "JSONValueTransformer+ISO8601.h")); - supportingFiles.add(new SupportingFile("Configuration-body.mustache", coreFileFolder(), classPrefix + "Configuration.m")); - supportingFiles.add(new SupportingFile("Configuration-header.mustache", coreFileFolder(), classPrefix + "Configuration.h")); + supportingFiles.add(new SupportingFile("Configuration-protocol.mustache", coreFileFolder(), classPrefix + "Configuration.h")); + supportingFiles.add(new SupportingFile("DefaultConfiguration-body.mustache", coreFileFolder(), classPrefix + "DefaultConfiguration.m")); + supportingFiles.add(new SupportingFile("DefaultConfiguration-header.mustache", coreFileFolder(), classPrefix + "DefaultConfiguration.h")); + supportingFiles.add(new SupportingFile("BasicAuthTokenProvider-header.mustache", coreFileFolder(), classPrefix + "BasicAuthTokenProvider.h")); + supportingFiles.add(new SupportingFile("BasicAuthTokenProvider-body.mustache", coreFileFolder(), classPrefix + "BasicAuthTokenProvider.m")); supportingFiles.add(new SupportingFile("api-protocol.mustache", coreFileFolder(), classPrefix + "Api.h")); supportingFiles.add(new SupportingFile("podspec.mustache", "", podName + ".podspec")); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); diff --git a/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache b/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache index 10cb6528d86..94529bf6dda 100644 --- a/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache @@ -1,10 +1,16 @@ +#import + #import "{{classPrefix}}ApiClient.h" +#import "{{classPrefix}}JSONRequestSerializer.h" +#import "{{classPrefix}}JSONResponseSerializer.h" +#import "{{classPrefix}}QueryParamCollection.h" +#import "{{classPrefix}}DefaultConfiguration.h" + + NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}ResponseObject"; -static NSUInteger requestId = 0; static bool offlineState = false; -static NSMutableSet * queuedRequests = nil; static bool cacheEnabled = false; static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable; static void (^reachabilityChangeBlock)(int); @@ -36,38 +42,61 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) @interface {{classPrefix}}ApiClient () -@property (nonatomic, strong) NSDictionary* HTTPResponseHeaders; +@property (nonatomic, strong, readwrite) id<{{classPrefix}}Configuration> configuration; @end @implementation {{classPrefix}}ApiClient +#pragma mark - Singleton Methods + ++ (instancetype) sharedClient { + static {{classPrefix}}ApiClient *sharedClient = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedClient = [[self alloc] init]; + }); + return sharedClient; +} + +#pragma mark - Initialize Methods + - (instancetype)init { - NSString *baseUrl = [[{{classPrefix}}Configuration sharedConfig] host]; - return [self initWithBaseURL:[NSURL URLWithString:baseUrl]]; + + return [self initWithConfiguration:[{{classPrefix}}DefaultConfiguration sharedConfig]]; } - (instancetype)initWithBaseURL:(NSURL *)url { + + return [self initWithBaseURL:url + configuration:[{{classPrefix}}DefaultConfiguration sharedConfig]]; + +} + +- (instancetype)initWithConfiguration:(id<{{classPrefix}}Configuration>)configuration { + + return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url + configuration:(id<{{classPrefix}}Configuration>)configuration { + self = [super initWithBaseURL:url]; if (self) { - self.timeoutInterval = 60; + _configuration = configuration; + _timeoutInterval = 60; + _responseDeserializer = [[{{classPrefix}}ResponseDeserializer alloc] init]; + _sanitizer = [[{{classPrefix}}Sanitizer alloc] init]; + self.requestSerializer = [AFJSONRequestSerializer serializer]; self.responseSerializer = [AFJSONResponseSerializer serializer]; self.securityPolicy = [self customSecurityPolicy]; - self.responseDeserializer = [[{{classPrefix}}ResponseDeserializer alloc] init]; - self.sanitizer = [[{{classPrefix}}Sanitizer alloc] init]; + // configure reachability [self configureCacheReachibility]; } - return self; -} -+ (void)initialize { - if (self == [{{classPrefix}}ApiClient class]) { - queuedRequests = [[NSMutableSet alloc] init]; - // initialize URL cache - [self configureCacheWithMemoryAndDiskCapacity:4*1024*1024 diskSize:32*1024*1024]; - } + return self; } #pragma mark - Setter Methods @@ -113,43 +142,6 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) [NSURLCache setSharedURLCache:cache]; } -#pragma mark - Request Methods - -+(NSUInteger)requestQueueSize { - return [queuedRequests count]; -} - -+(NSNumber*) nextRequestId { - @synchronized(self) { - return @(++requestId); - } -} - -+(NSNumber*) queueRequest { - NSNumber* requestId = [[self class] nextRequestId]; - {{classPrefix}}DebugLog(@"added %@ to request queue", requestId); - [queuedRequests addObject:requestId]; - return requestId; -} - -+(void) cancelRequest:(NSNumber*)requestId { - [queuedRequests removeObject:requestId]; -} - --(Boolean) executeRequestWithId:(NSNumber*) requestId { - NSSet* matchingItems = [queuedRequests objectsPassingTest:^BOOL(id obj, BOOL *stop) { - return [obj intValue] == [requestId intValue]; - }]; - - if (matchingItems.count == 1) { - {{classPrefix}}DebugLog(@"removed request id %@", requestId); - [queuedRequests removeObject:requestId]; - return YES; - } else { - return NO; - } -} - #pragma mark - Reachability Methods +(AFNetworkReachabilityStatus) getReachabilityStatus { @@ -179,23 +171,19 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) [self.reachabilityManager startMonitoring]; } -#pragma mark - Operation Methods +#pragma mark - Task Methods -- (void) operationWithCompletionBlock: (NSURLRequest *)request - requestId: (NSNumber *) requestId - completionBlock: (void (^)(id, NSError *))completionBlock { - __weak __typeof(self)weakSelf = self; - NSURLSessionDataTask* op = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if (![strongSelf executeRequestWithId:requestId]) { - return; - } +- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request + completionBlock: (void (^)(id, NSError *))completionBlock { + + NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { {{classPrefix}}DebugLogResponse(response, responseObject,request,error); - strongSelf.HTTPResponseHeaders = {{classPrefix}}__headerFieldsForResponse(response); + if(!error) { completionBlock(responseObject, nil); return; } + NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { // Add in the (parsed) response body. @@ -204,20 +192,18 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); }]; - [op resume]; + + return task; } -- (void) downloadOperationWithCompletionBlock: (NSURLRequest *)request - requestId: (NSNumber *) requestId - completionBlock: (void (^)(id, NSError *))completionBlock { - __weak __typeof(self)weakSelf = self; - NSURLSessionDataTask* op = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if (![strongSelf executeRequestWithId:requestId]) { - return; - } - strongSelf.HTTPResponseHeaders = {{classPrefix}}__headerFieldsForResponse(response); +- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request + completionBlock: (void (^)(id, NSError *))completionBlock { + + id<{{classPrefix}}Configuration> config = self.configuration; + + NSURLSessionDataTask* task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { {{classPrefix}}DebugLogResponse(response, responseObject,request,error); + if(error) { NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { @@ -226,8 +212,9 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); } - NSString *directory = [self configuration].tempFolderPath ?: NSTemporaryDirectory(); - NSString * filename = {{classPrefix}}__fileNameForResponse(response); + + NSString *directory = config.tempFolderPath ?: NSTemporaryDirectory(); + NSString *filename = {{classPrefix}}__fileNameForResponse(response); NSString *filepath = [directory stringByAppendingPathComponent:filename]; NSURL *file = [NSURL fileURLWithPath:filepath]; @@ -236,24 +223,26 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) completionBlock(file, nil); }]; - [op resume]; + + return task; } -#pragma mark - Perform Request Methods +#pragma mark - Perform Request Methods + +- (NSURLSessionTask*) requestWithPath: (NSString*) path + method: (NSString*) method + pathParams: (NSDictionary *) pathParams + queryParams: (NSDictionary*) queryParams + formParams: (NSDictionary *) formParams + files: (NSDictionary *) files + body: (id) body + headerParams: (NSDictionary*) headerParams + authSettings: (NSArray *) authSettings + requestContentType: (NSString*) requestContentType + responseContentType: (NSString*) responseContentType + responseType: (NSString *) responseType + completionBlock: (void (^)(id, NSError *))completionBlock { --(NSNumber*) requestWithPath: (NSString*) path - method: (NSString*) method - pathParams: (NSDictionary *) pathParams - queryParams: (NSDictionary*) queryParams - formParams: (NSDictionary *) formParams - files: (NSDictionary *) files - body: (id) body - headerParams: (NSDictionary*) headerParams - authSettings: (NSArray *) authSettings - requestContentType: (NSString*) requestContentType - responseContentType: (NSString*) responseContentType - responseType: (NSString *) responseType - completionBlock: (void (^)(id, NSError *))completionBlock { // setting request serializer if ([requestContentType isEqualToString:@"application/json"]) { self.requestSerializer = [{{classPrefix}}JSONRequestSerializer serializer]; @@ -359,14 +348,16 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) [self postProcessRequest:request]; - NSNumber* requestId = [{{classPrefix}}ApiClient queueRequest]; + + NSURLSessionTask *task = nil; + if ([responseType isEqualToString:@"NSURL*"] || [responseType isEqualToString:@"NSURL"]) { - [self downloadOperationWithCompletionBlock:request requestId:requestId completionBlock:^(id data, NSError *error) { + task = [self downloadTaskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { completionBlock(data, error); }]; } else { - [self operationWithCompletionBlock:request requestId:requestId completionBlock:^(id data, NSError *error) { + task = [self taskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { NSError * serializationError; id response = [self.responseDeserializer deserialize:data class:responseType error:&serializationError]; if(!response && !error){ @@ -375,7 +366,10 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) completionBlock(response, error); }]; } - return requestId; + + [task resume]; + + return task; } //Added for easier override to modify request @@ -455,10 +449,11 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) NSMutableDictionary *headersWithAuth = [NSMutableDictionary dictionaryWithDictionary:*headers]; NSMutableDictionary *querysWithAuth = [NSMutableDictionary dictionaryWithDictionary:*querys]; - - NSDictionary* configurationAuthSettings = [[self configuration] authSettings]; + + id<{{classPrefix}}Configuration> config = self.configuration; for (NSString *auth in authSettings) { - NSDictionary *authSetting = configurationAuthSettings[auth]; + NSDictionary *authSetting = config.authSettings[auth]; + if(!authSetting) { // auth setting is set only if the key is non-empty continue; } @@ -479,11 +474,11 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) - (AFSecurityPolicy *) customSecurityPolicy { AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; - {{classPrefix}}Configuration *config = [self configuration]; + id<{{classPrefix}}Configuration> config = self.configuration; if (config.sslCaCert) { NSData *certData = [NSData dataWithContentsOfFile:config.sslCaCert]; - [securityPolicy setPinnedCertificates:@[certData]]; + [securityPolicy setPinnedCertificates:[NSSet setWithObject:certData]]; } if (config.verifySSL) { @@ -497,8 +492,4 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) return securityPolicy; } -- ({{classPrefix}}Configuration*) configuration { - return [{{classPrefix}}Configuration sharedConfig]; -} - @end diff --git a/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache b/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache index be5eba32ee0..7a128929bbe 100644 --- a/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache @@ -1,22 +1,10 @@ -#import -#import #import -#import "{{classPrefix}}JSONResponseSerializer.h" -#import "{{classPrefix}}JSONRequestSerializer.h" -#import "{{classPrefix}}QueryParamCollection.h" #import "{{classPrefix}}Configuration.h" #import "{{classPrefix}}ResponseDeserializer.h" #import "{{classPrefix}}Sanitizer.h" -#import "{{classPrefix}}Logger.h" {{>licenceInfo}} -{{#models}}{{#model}}#import "{{classname}}.h" -{{/model}}{{/models}} -{{^models}}#import "{{classPrefix}}Object.h"{{/models}} - -@class {{classPrefix}}Configuration; - /** * A key for `NSError` user info dictionaries. * @@ -24,15 +12,15 @@ */ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; + @interface {{classPrefix}}ApiClient : AFHTTPSessionManager +@property (nonatomic, strong, readonly) id<{{classPrefix}}Configuration> configuration; + @property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property(nonatomic, assign) NSTimeInterval timeoutInterval; @property(nonatomic, readonly) NSOperationQueue* queue; -/// In order to ensure the HTTPResponseHeaders are correct, it is recommended to initialize one {{classPrefix}}ApiClient instance per thread. -@property(nonatomic, readonly) NSDictionary* HTTPResponseHeaders; - @property(nonatomic, strong) id<{{classPrefix}}ResponseDeserializer> responseDeserializer; @property(nonatomic, strong) id<{{classPrefix}}Sanitizer> sanitizer; @@ -48,13 +36,6 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; */ +(void)setCacheEnabled:(BOOL) enabled; -/** - * Gets the request queue size - * - * @return The size of `queuedRequests` static variable. - */ -+(NSUInteger)requestQueueSize; - /** * Sets the client unreachable * @@ -83,27 +64,6 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; */ +(AFNetworkReachabilityStatus) getReachabilityStatus; -/** - * Gets the next request id - * - * @return The next executed request id. - */ -+(NSNumber*) nextRequestId; - -/** - * Generates request id and add it to the queue - * - * @return The next executed request id. - */ -+(NSNumber*) queueRequest; - -/** - * Removes request id from the queue - * - * @param requestId The request which will be removed. - */ -+(void) cancelRequest:(NSNumber*)requestId; - /** * Customizes the behavior when the reachability changed * @@ -111,6 +71,11 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; */ +(void) setReachabilityChangeBlock:(void(^)(int))changeBlock; +/** + * Gets client singleton instance + */ ++ (instancetype) sharedClient; + /** * Sets the api client reachability strategy */ @@ -136,6 +101,14 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; queryParams:(NSDictionary **)querys WithAuthSettings:(NSArray *)authSettings; + +/** + * Initializes the session manager with a configuration. + * + * @param configuration The configuration implementation + */ +- (instancetype)initWithConfiguration:(id<{{classPrefix}}Configuration>)configuration; + /** * Performs request * @@ -150,21 +123,21 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; * @param responseContentType Response content-type. * @param completionBlock The block will be executed when the request completed. * - * @return The request id. + * @return The created session task. */ --(NSNumber*) requestWithPath:(NSString*) path - method:(NSString*) method - pathParams:(NSDictionary *) pathParams - queryParams:(NSDictionary*) queryParams - formParams:(NSDictionary *) formParams - files:(NSDictionary *) files - body:(id) body - headerParams:(NSDictionary*) headerParams - authSettings:(NSArray *) authSettings - requestContentType:(NSString*) requestContentType - responseContentType:(NSString*) responseContentType - responseType:(NSString *) responseType - completionBlock:(void (^)(id, NSError *))completionBlock; +- (NSURLSessionTask*) requestWithPath: (NSString*) path + method: (NSString*) method + pathParams: (NSDictionary *) pathParams + queryParams: (NSDictionary*) queryParams + formParams: (NSDictionary *) formParams + files: (NSDictionary *) files + body: (id) body + headerParams: (NSDictionary*) headerParams + authSettings: (NSArray *) authSettings + requestContentType: (NSString*) requestContentType + responseContentType: (NSString*) responseContentType + responseType: (NSString *) responseType + completionBlock: (void (^)(id, NSError *))completionBlock; /** * Custom security policy @@ -173,12 +146,4 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; */ - (AFSecurityPolicy *) customSecurityPolicy; -/** - * {{classPrefix}}Configuration return sharedConfig - * - * @return {{classPrefix}}Configuration - */ -- ({{classPrefix}}Configuration*) configuration; - - @end diff --git a/modules/swagger-codegen/src/main/resources/objc/BasicAuthTokenProvider-body.mustache b/modules/swagger-codegen/src/main/resources/objc/BasicAuthTokenProvider-body.mustache new file mode 100644 index 00000000000..a928e5e8f4e --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/objc/BasicAuthTokenProvider-body.mustache @@ -0,0 +1,19 @@ +#import "{{classPrefix}}BasicAuthTokenProvider.h" + +@implementation {{classPrefix}}BasicAuthTokenProvider + ++ (NSString *)createBasicAuthTokenWithUsername:(NSString *)username password:(NSString *)password { + + // return empty string if username and password are empty + if (username.length == 0 && password.length == 0){ + return @""; + } + + NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password]; + NSData *data = [basicAuthCredentials dataUsingEncoding:NSUTF8StringEncoding]; + basicAuthCredentials = [NSString stringWithFormat:@"Basic %@", [data base64EncodedStringWithOptions:0]]; + + return basicAuthCredentials; +} + +@end diff --git a/modules/swagger-codegen/src/main/resources/objc/BasicAuthTokenProvider-header.mustache b/modules/swagger-codegen/src/main/resources/objc/BasicAuthTokenProvider-header.mustache new file mode 100644 index 00000000000..dfb287568a0 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/objc/BasicAuthTokenProvider-header.mustache @@ -0,0 +1,14 @@ +/** The `{{classPrefix}}BasicAuthTokenProvider` class creates a basic auth token from username and password. + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +#import + +@interface {{classPrefix}}BasicAuthTokenProvider : NSObject + ++ (NSString *)createBasicAuthTokenWithUsername:(NSString *)username password:(NSString *)password; + +@end \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/objc/Configuration-protocol.mustache b/modules/swagger-codegen/src/main/resources/objc/Configuration-protocol.mustache new file mode 100644 index 00000000000..db429a38150 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/objc/Configuration-protocol.mustache @@ -0,0 +1,75 @@ +#import +#import "{{classPrefix}}Logger.h" + +{{>licenceInfo}} + +@protocol {{classPrefix}}Configuration + +/** + * Api logger + */ +@property (readonly, nonatomic) {{classPrefix}}Logger *logger; + +/** + * Base url + */ +@property (readonly, nonatomic) NSString *host; + +/** + * Api key values for Api Key type Authentication + */ +@property (readonly, nonatomic) NSDictionary *apiKey; + +/** + * Api key prefix values to be prepend to the respective api key + */ +@property (readonly, nonatomic) NSDictionary *apiKeyPrefix; + +/** + * Username for HTTP Basic Authentication + */ +@property (readonly, nonatomic) NSString *username; + +/** + * Password for HTTP Basic Authentication + */ +@property (readonly, nonatomic) NSString *password; + +/** + * Access token for OAuth + */ +@property (readonly, nonatomic) NSString *accessToken; + +/** + * Temp folder for file download + */ +@property (readonly, nonatomic) NSString *tempFolderPath; + +/** + * Debug switch, default false + */ +@property (readonly, nonatomic) BOOL debug; + +/** + * SSL/TLS verification + * Set this to NO to skip verifying SSL certificate when calling API from https server + */ +@property (readonly, nonatomic) BOOL verifySSL; + +/** + * SSL/TLS verification + * Set this to customize the certificate file to verify the peer + */ +@property (readonly, nonatomic) NSString *sslCaCert; + +/** + * Authentication Settings + */ +@property (readonly, nonatomic) NSDictionary *authSettings; + +/** +* Default headers for all services +*/ +@property (readonly, nonatomic, strong) NSDictionary *defaultHeaders; + +@end \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/objc/Configuration-body.mustache b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache similarity index 73% rename from modules/swagger-codegen/src/main/resources/objc/Configuration-body.mustache rename to modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache index 1aeca25dd3e..7c2b6cda20b 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Configuration-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache @@ -1,6 +1,7 @@ -#import "{{classPrefix}}Configuration.h" +#import "{{classPrefix}}DefaultConfiguration.h" +#import "{{classPrefix}}BasicAuthTokenProvider.h" -@interface {{classPrefix}}Configuration () +@interface {{classPrefix}}DefaultConfiguration () @property (nonatomic, strong) NSMutableDictionary *mutableDefaultHeaders; @property (nonatomic, strong) NSMutableDictionary *mutableApiKey; @@ -8,12 +9,12 @@ @end -@implementation {{classPrefix}}Configuration +@implementation {{classPrefix}}DefaultConfiguration #pragma mark - Singleton Methods + (instancetype) sharedConfig { - static {{classPrefix}}Configuration *shardConfig = nil; + static {{classPrefix}}DefaultConfiguration *shardConfig = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ shardConfig = [[self alloc] init]; @@ -26,17 +27,16 @@ - (instancetype) init { self = [super init]; if (self) { - self.apiClient = nil; - self.host = @"{{basePath}}"; - self.username = @""; - self.password = @""; - self.accessToken= @""; - self.verifySSL = YES; - self.mutableApiKey = [NSMutableDictionary dictionary]; - self.mutableApiKeyPrefix = [NSMutableDictionary dictionary]; - self.mutableDefaultHeaders = [NSMutableDictionary dictionary]; - self.mutableDefaultHeaders[@"User-Agent"] = {{#httpUserAgent}}@"{{httpUserAgent}}"{{/httpUserAgent}}{{^httpUserAgent}}[NSString stringWithFormat:@"Swagger-Codegen/{{version}}/objc (%@; iOS %@; Scale/%0.2f)",[[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]{{/httpUserAgent}}; - self.logger = [{{classPrefix}}Logger sharedLogger]; + _host = @"{{basePath}}"; + _username = @""; + _password = @""; + _accessToken= @""; + _verifySSL = YES; + _mutableApiKey = [NSMutableDictionary dictionary]; + _mutableApiKeyPrefix = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; + {{#httpUserAgent}}_mutableDefaultHeaders[@"User-Agent"] = @"{{httpUserAgent}}"{{/httpUserAgent}}; + _logger = [{{classPrefix}}Logger sharedLogger]; } return self; } @@ -58,16 +58,9 @@ } - (NSString *) getBasicAuthToken { - // return empty string if username and password are empty - if (self.username.length == 0 && self.password.length == 0){ - return @""; - } - NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", self.username, self.password]; - NSData *data = [basicAuthCredentials dataUsingEncoding:NSUTF8StringEncoding]; - basicAuthCredentials = [NSString stringWithFormat:@"Basic %@", [data base64EncodedStringWithOptions:0]]; - - return basicAuthCredentials; + NSString *basicAuthToken = [{{classPrefix}}BasicAuthTokenProvider createBasicAuthTokenWithUsername:self.username password:self.password]; + return basicAuthToken; } - (NSString *) getAccessToken { diff --git a/modules/swagger-codegen/src/main/resources/objc/Configuration-header.mustache b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-header.mustache similarity index 92% rename from modules/swagger-codegen/src/main/resources/objc/Configuration-header.mustache rename to modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-header.mustache index e727942a4f2..f93c864ecfe 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Configuration-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-header.mustache @@ -1,23 +1,16 @@ #import -#import "{{classPrefix}}ApiClient.h" -#import "{{classPrefix}}Logger.h" +#import "{{classPrefix}}Configuration.h" {{>licenceInfo}} -@class {{classPrefix}}ApiClient; +@interface {{classPrefix}}DefaultConfiguration : NSObject <{{classPrefix}}Configuration> -@interface {{classPrefix}}Configuration : NSObject /** * Default api logger */ @property (nonatomic, strong) {{classPrefix}}Logger * logger; -/** - * Default api client - */ -@property (nonatomic) {{classPrefix}}ApiClient *apiClient; - /** * Default base url */ diff --git a/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601-body.mustache b/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601-body.mustache index cec8bdeea27..b544a1dae58 100644 --- a/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601-body.mustache @@ -1,3 +1,4 @@ +#import #import "JSONValueTransformer+ISO8601.h" @implementation JSONValueTransformer (ISO8601) diff --git a/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601-header.mustache b/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601-header.mustache index 2a8d5b0c9e7..f621e7184a9 100644 --- a/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601-header.mustache @@ -1,5 +1,4 @@ #import -#import #import {{>licenceInfo}} diff --git a/modules/swagger-codegen/src/main/resources/objc/Object-body.mustache b/modules/swagger-codegen/src/main/resources/objc/Object-body.mustache index b4599c34f3f..88df6d6c9ae 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Object-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Object-body.mustache @@ -2,6 +2,35 @@ @implementation {{classPrefix}}Object +/** + * Workaround for JSONModel multithreading issues + * https://github.com/icanzilb/JSONModel/issues/441 + */ +- (instancetype)initWithDictionary:(NSDictionary *)dict error:(NSError **)err { + static NSMutableSet *classNames; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + classNames = [NSMutableSet new]; + }); + + BOOL initSync; + @synchronized([self class]) + { + NSString *className = NSStringFromClass([self class]); + initSync = ![classNames containsObject:className]; + if(initSync) + { + [classNames addObject:className]; + self = [super initWithDictionary:dict error:err]; + } + } + if(!initSync) + { + self = [super initWithDictionary:dict error:err]; + } + return self; +} + /** * Gets the string presentation of the object. * This method will be called when logging model object using `NSLog`. diff --git a/modules/swagger-codegen/src/main/resources/objc/QueryParamCollection-body.mustache b/modules/swagger-codegen/src/main/resources/objc/QueryParamCollection-body.mustache index 23d0c8eaa86..b1c901dbffa 100644 --- a/modules/swagger-codegen/src/main/resources/objc/QueryParamCollection-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/QueryParamCollection-body.mustache @@ -5,11 +5,15 @@ @synthesize values = _values; @synthesize format = _format; -- (id) initWithValuesAndFormat: (NSArray*) values - format: (NSString*) format { - _values = values; - _format = format; +- (id)initWithValuesAndFormat:(NSArray *)values + format:(NSString *)format { + self = [super init]; + if (self) { + _values = values; + _format = format; + } + return self; } diff --git a/modules/swagger-codegen/src/main/resources/objc/README.mustache b/modules/swagger-codegen/src/main/resources/objc/README.mustache index 4355ecc1af5..c6e9f2cc1d2 100644 --- a/modules/swagger-codegen/src/main/resources/objc/README.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/README.mustache @@ -45,7 +45,7 @@ Import the following: ```objc #import <{{podName}}/{{{classPrefix}}}ApiClient.h> -#import <{{podName}}/{{{classPrefix}}}Configuration.h> +#import <{{podName}}/{{{classPrefix}}}DefaultConfiguration.h> // load models {{#models}}{{#model}}#import <{{podName}}/{{{classname}}}.h> {{/model}}{{/models}}// load API classes for accessing endpoints @@ -64,7 +64,7 @@ Please follow the [installation procedure](#installation--usage) and then run th ```objc {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} {{#hasAuthMethods}} -{{classPrefix}}Configuration *apiConfig = [{{classPrefix}}Configuration sharedConfig]; +{{classPrefix}}DefaultConfiguration *apiConfig = [{{classPrefix}}DefaultConfiguration sharedConfig]; {{#authMethods}}{{#isBasic}}// Configure HTTP basic authorization (authentication scheme: {{{name}}}) [apiConfig setUsername:@"YOUR_USERNAME"]; [apiConfig setPassword:@"YOUR_PASSWORD"]; diff --git a/modules/swagger-codegen/src/main/resources/objc/api-body.mustache b/modules/swagger-codegen/src/main/resources/objc/api-body.mustache index 57fdc4ae6a7..505cfdd3c88 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-body.mustache @@ -7,7 +7,7 @@ @interface {{classname}} () -@property (nonatomic, strong) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; @end @@ -21,19 +21,11 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; #pragma mark - Initialize methods - (instancetype) init { - self = [super init]; - if (self) { - {{classPrefix}}Configuration *config = [{{classPrefix}}Configuration sharedConfig]; - if (config.apiClient == nil) { - config.apiClient = [[{{classPrefix}}ApiClient alloc] init]; - } - _apiClient = config.apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; - } - return self; + return [self initWithApiClient:[{{classPrefix}}ApiClient sharedClient]]; } -- (id) initWithApiClient:({{classPrefix}}ApiClient *)apiClient { + +-(instancetype) initWithApiClient:({{classPrefix}}ApiClient *)apiClient { self = [super init]; if (self) { _apiClient = apiClient; @@ -44,15 +36,6 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; #pragma mark - -+ (instancetype)sharedAPI { - static {{classname}} *sharedAPI; - static dispatch_once_t once; - dispatch_once(&once, ^{ - sharedAPI = [[self alloc] init]; - }); - return sharedAPI; -} - -(NSString*) defaultHeaderForKey:(NSString*)key { return self.defaultHeaders[key]; } @@ -65,10 +48,6 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; [self.defaultHeaders setValue:value forKey:key]; } --(NSUInteger) requestQueueSize { - return [{{classPrefix}}ApiClient requestQueueSize]; -} - #pragma mark - Api Methods {{#operation}} @@ -79,7 +58,7 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; /// /// {{/allParams}} @returns {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} /// --(NSNumber*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}} +-(NSURLSessionTask*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}} {{paramName}}{{/secondaryParam}}: ({{{dataType}}}) {{paramName}}{{/allParams}} {{#hasParams}}completionHandler: {{/hasParams}}(void (^)({{#returnBaseType}}{{{returnType}}} output, {{/returnBaseType}}NSError* error)) handler { {{#allParams}} @@ -175,8 +154,7 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; if(handler) { handler({{#returnType}}({{{ returnType }}})data, {{/returnType}}error); } - } - ]; + }]; } {{/operation}} diff --git a/modules/swagger-codegen/src/main/resources/objc/api-header.mustache b/modules/swagger-codegen/src/main/resources/objc/api-header.mustache index abe4cf64eb0..266e7355fd6 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-header.mustache @@ -11,7 +11,7 @@ extern NSString* k{{classname}}ErrorDomain; extern NSInteger k{{classname}}MissingParamErrorCode; -+(instancetype) sharedAPI; +-(instancetype) initWithApiClient:({{classPrefix}}ApiClient *)apiClient NS_DESIGNATED_INITIALIZER; {{#operations}} {{#operation}} @@ -23,7 +23,7 @@ extern NSInteger k{{classname}}MissingParamErrorCode; /// code:{{{code}}} message:"{{{message}}}"{{#hasMore}},{{/hasMore}}{{/responses}} /// /// @return {{{returnType}}} --(NSNumber*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}} +-(NSURLSessionTask*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}} {{paramName}}{{/secondaryParam}}: ({{{dataType}}}) {{paramName}}{{/allParams}} {{#hasParams}}completionHandler: {{/hasParams}}(void (^)({{#returnBaseType}}{{{returnType}}} output, {{/returnBaseType}}NSError* error)) handler; diff --git a/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache b/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache index da87a712fa2..d8dadda1d0c 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache @@ -6,15 +6,13 @@ @protocol {{classPrefix}}Api -@property(nonatomic, assign) {{classPrefix}}ApiClient *apiClient; +@property(readonly, nonatomic, strong) {{classPrefix}}ApiClient *apiClient; --(id) initWithApiClient:({{classPrefix}}ApiClient *)apiClient; +-(instancetype) initWithApiClient:({{classPrefix}}ApiClient *)apiClient; -(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:"); -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; -(NSString*) defaultHeaderForKey:(NSString*)key; --(NSUInteger) requestQueueSize; - @end diff --git a/modules/swagger-codegen/src/main/resources/objc/api_doc.mustache b/modules/swagger-codegen/src/main/resources/objc/api_doc.mustache index 44fe31d6404..b17c155b50e 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api_doc.mustache @@ -12,7 +12,7 @@ Method | HTTP request | Description {{#operation}} # **{{{operationId}}}** ```objc --(NSNumber*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}} +-(NSURLSessionTask*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}} {{paramName}}{{/secondaryParam}}: ({{{dataType}}}) {{paramName}}{{/allParams}} {{#hasParams}}completionHandler: {{/hasParams}}(void (^)({{#returnBaseType}}{{{returnType}}} output, {{/returnBaseType}}NSError* error)) handler; ``` @@ -24,7 +24,7 @@ Method | HTTP request | Description ### Example ```objc {{#hasAuthMethods}} -{{classPrefix}}Configuration *apiConfig = [{{classPrefix}}Configuration sharedConfig]; +{{classPrefix}}DefaultConfiguration *apiConfig = [{{classPrefix}}DefaultConfiguration sharedConfig]; {{#authMethods}}{{#isBasic}}// Configure HTTP basic authorization (authentication scheme: {{{name}}}) [apiConfig setUsername:@"YOUR_USERNAME"]; [apiConfig setPassword:@"YOUR_PASSWORD"]; diff --git a/modules/swagger-codegen/src/main/resources/objc/podspec.mustache b/modules/swagger-codegen/src/main/resources/objc/podspec.mustache index bd0bd9f328e..7a2b22bea28 100644 --- a/modules/swagger-codegen/src/main/resources/objc/podspec.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/podspec.mustache @@ -32,6 +32,6 @@ Pod::Spec.new do |s| s.dependency 'AFNetworking', '~> 3' s.dependency 'JSONModel', '~> 1.2' - s.dependency 'ISO8601', '~> 0.5' + s.dependency 'ISO8601', '~> 0.6' end diff --git a/samples/client/petstore/objc/core-data/README.md b/samples/client/petstore/objc/core-data/README.md index 3fe81114d77..928576550bb 100644 --- a/samples/client/petstore/objc/core-data/README.md +++ b/samples/client/petstore/objc/core-data/README.md @@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi - API version: 1.0.0 - Package version: -- Build date: 2016-07-19T16:53:26.476+08:00 +- Build date: 2016-08-04T12:24:23.866+02:00 - Build package: class io.swagger.codegen.languages.ObjcClientCodegen ## Requirements @@ -40,7 +40,7 @@ Import the following: ```objc #import -#import +#import // load models #import #import @@ -64,7 +64,7 @@ Please follow the [installation procedure](#installation--usage) and then run th ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; @@ -124,12 +124,6 @@ Class | Method | HTTP request | Description ## Documentation For Authorization -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - ## petstore_auth - **Type**: OAuth @@ -139,6 +133,12 @@ Class | Method | HTTP request | Description - **write:pets**: modify pets in your account - **read:pets**: read your pets +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + ## Author diff --git a/samples/client/petstore/objc/core-data/SwaggerClient.podspec b/samples/client/petstore/objc/core-data/SwaggerClient.podspec index eab61d4dc32..fd785a6255c 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient.podspec +++ b/samples/client/petstore/objc/core-data/SwaggerClient.podspec @@ -32,6 +32,6 @@ Pod::Spec.new do |s| s.dependency 'AFNetworking', '~> 3' s.dependency 'JSONModel', '~> 1.2' - s.dependency 'ISO8601', '~> 0.5' + s.dependency 'ISO8601', '~> 0.6' end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h index 97f914a627e..ade955b27f8 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h @@ -32,7 +32,7 @@ extern NSString* kSWGPetApiErrorDomain; extern NSInteger kSWGPetApiMissingParamErrorCode; -+(instancetype) sharedAPI; +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient NS_DESIGNATED_INITIALIZER; /// Add a new pet to the store /// @@ -42,7 +42,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:405 message:"Invalid input" /// /// @return --(NSNumber*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler; @@ -55,7 +55,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:400 message:"Invalid pet value" /// /// @return --(NSNumber*) deletePetWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) deletePetWithPetId: (NSNumber*) petId apiKey: (NSString*) apiKey completionHandler: (void (^)(NSError* error)) handler; @@ -69,7 +69,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:400 message:"Invalid status value" /// /// @return NSArray* --(NSNumber*) findPetsByStatusWithStatus: (NSArray*) status +-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status completionHandler: (void (^)(NSArray* output, NSError* error)) handler; @@ -82,7 +82,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:400 message:"Invalid tag value" /// /// @return NSArray* --(NSNumber*) findPetsByTagsWithTags: (NSArray*) tags +-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags completionHandler: (void (^)(NSArray* output, NSError* error)) handler; @@ -96,7 +96,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:404 message:"Pet not found" /// /// @return SWGPet* --(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) getPetByIdWithPetId: (NSNumber*) petId completionHandler: (void (^)(SWGPet* output, NSError* error)) handler; @@ -110,7 +110,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:405 message:"Validation exception" /// /// @return --(NSNumber*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler; @@ -124,7 +124,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:405 message:"Invalid input" /// /// @return --(NSNumber*) updatePetWithFormWithPetId: (NSString*) petId +-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId name: (NSString*) name status: (NSString*) status completionHandler: (void (^)(NSError* error)) handler; @@ -140,7 +140,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) uploadFileWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId additionalMetadata: (NSString*) additionalMetadata file: (NSURL*) file completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m index e35421fc520..5551bffae9a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m @@ -5,7 +5,7 @@ @interface SWGPetApi () -@property (nonatomic, strong) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; @end @@ -19,19 +19,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; #pragma mark - Initialize methods - (instancetype) init { - self = [super init]; - if (self) { - SWGConfiguration *config = [SWGConfiguration sharedConfig]; - if (config.apiClient == nil) { - config.apiClient = [[SWGApiClient alloc] init]; - } - _apiClient = config.apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; - } - return self; + return [self initWithApiClient:[SWGApiClient sharedClient]]; } -- (id) initWithApiClient:(SWGApiClient *)apiClient { + +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient { self = [super init]; if (self) { _apiClient = apiClient; @@ -42,15 +34,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; #pragma mark - -+ (instancetype)sharedAPI { - static SWGPetApi *sharedAPI; - static dispatch_once_t once; - dispatch_once(&once, ^{ - sharedAPI = [[self alloc] init]; - }); - return sharedAPI; -} - -(NSString*) defaultHeaderForKey:(NSString*)key { return self.defaultHeaders[key]; } @@ -63,10 +46,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; [self.defaultHeaders setValue:value forKey:key]; } --(NSUInteger) requestQueueSize { - return [SWGApiClient requestQueueSize]; -} - #pragma mark - Api Methods /// @@ -76,7 +55,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -124,8 +103,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -137,7 +115,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) deletePetWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) deletePetWithPetId: (NSNumber*) petId apiKey: (NSString*) apiKey completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'petId' is set @@ -202,8 +180,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -213,7 +190,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns NSArray* /// --(NSNumber*) findPetsByStatusWithStatus: (NSArray*) status +-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status completionHandler: (void (^)(NSArray* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByStatus"]; @@ -264,8 +241,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler((NSArray*)data, error); } - } - ]; + }]; } /// @@ -275,7 +251,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns NSArray* /// --(NSNumber*) findPetsByTagsWithTags: (NSArray*) tags +-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags completionHandler: (void (^)(NSArray* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByTags"]; @@ -326,8 +302,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler((NSArray*)data, error); } - } - ]; + }]; } /// @@ -337,7 +312,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns SWGPet* /// --(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) getPetByIdWithPetId: (NSNumber*) petId completionHandler: (void (^)(SWGPet* output, NSError* error)) handler { // verify the required parameter 'petId' is set if (petId == nil) { @@ -376,7 +351,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; // Authentication setting - NSArray *authSettings = @[@"api_key", @"petstore_auth"]; + NSArray *authSettings = @[@"petstore_auth", @"api_key"]; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; @@ -398,8 +373,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler((SWGPet*)data, error); } - } - ]; + }]; } /// @@ -409,7 +383,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -457,8 +431,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -472,7 +445,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) updatePetWithFormWithPetId: (NSString*) petId +-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId name: (NSString*) name status: (NSString*) status completionHandler: (void (^)(NSError* error)) handler { @@ -541,8 +514,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -556,7 +528,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) uploadFileWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId additionalMetadata: (NSString*) additionalMetadata file: (NSURL*) file completionHandler: (void (^)(NSError* error)) handler { @@ -623,8 +595,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h index bbd588dba25..92aeefb176e 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h @@ -32,7 +32,7 @@ extern NSString* kSWGStoreApiErrorDomain; extern NSInteger kSWGStoreApiMissingParamErrorCode; -+(instancetype) sharedAPI; +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient NS_DESIGNATED_INITIALIZER; /// Delete purchase order by ID /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -43,7 +43,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// code:404 message:"Order not found" /// /// @return --(NSNumber*) deleteOrderWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) deleteOrderWithOrderId: (NSString*) orderId completionHandler: (void (^)(NSError* error)) handler; @@ -54,7 +54,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// code:200 message:"successful operation" /// /// @return NSDictionary* --(NSNumber*) getInventoryWithCompletionHandler: +-(NSURLSessionTask*) getInventoryWithCompletionHandler: (void (^)(NSDictionary* output, NSError* error)) handler; @@ -68,7 +68,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// code:404 message:"Order not found" /// /// @return SWGOrder* --(NSNumber*) getOrderByIdWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; @@ -81,7 +81,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// code:400 message:"Invalid Order" /// /// @return SWGOrder* --(NSNumber*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m index e5964200f20..a275c1f0568 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m @@ -5,7 +5,7 @@ @interface SWGStoreApi () -@property (nonatomic, strong) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; @end @@ -19,19 +19,11 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; #pragma mark - Initialize methods - (instancetype) init { - self = [super init]; - if (self) { - SWGConfiguration *config = [SWGConfiguration sharedConfig]; - if (config.apiClient == nil) { - config.apiClient = [[SWGApiClient alloc] init]; - } - _apiClient = config.apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; - } - return self; + return [self initWithApiClient:[SWGApiClient sharedClient]]; } -- (id) initWithApiClient:(SWGApiClient *)apiClient { + +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient { self = [super init]; if (self) { _apiClient = apiClient; @@ -42,15 +34,6 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; #pragma mark - -+ (instancetype)sharedAPI { - static SWGStoreApi *sharedAPI; - static dispatch_once_t once; - dispatch_once(&once, ^{ - sharedAPI = [[self alloc] init]; - }); - return sharedAPI; -} - -(NSString*) defaultHeaderForKey:(NSString*)key { return self.defaultHeaders[key]; } @@ -63,10 +46,6 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; [self.defaultHeaders setValue:value forKey:key]; } --(NSUInteger) requestQueueSize { - return [SWGApiClient requestQueueSize]; -} - #pragma mark - Api Methods /// @@ -76,7 +55,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) deleteOrderWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) deleteOrderWithOrderId: (NSString*) orderId completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'orderId' is set if (orderId == nil) { @@ -137,8 +116,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -146,7 +124,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// Returns a map of status codes to quantities /// @returns NSDictionary* /// --(NSNumber*) getInventoryWithCompletionHandler: +-(NSURLSessionTask*) getInventoryWithCompletionHandler: (void (^)(NSDictionary* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/inventory"]; @@ -193,8 +171,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; if(handler) { handler((NSDictionary*)data, error); } - } - ]; + }]; } /// @@ -204,7 +181,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// @returns SWGOrder* /// --(NSNumber*) getOrderByIdWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { // verify the required parameter 'orderId' is set if (orderId == nil) { @@ -265,8 +242,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; if(handler) { handler((SWGOrder*)data, error); } - } - ]; + }]; } /// @@ -276,7 +252,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// @returns SWGOrder* /// --(NSNumber*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"]; @@ -324,8 +300,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; if(handler) { handler((SWGOrder*)data, error); } - } - ]; + }]; } diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h index 67f8ec9cbb2..2c35bdcb7b0 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h @@ -32,7 +32,7 @@ extern NSString* kSWGUserApiErrorDomain; extern NSInteger kSWGUserApiMissingParamErrorCode; -+(instancetype) sharedAPI; +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient NS_DESIGNATED_INITIALIZER; /// Create user /// This can only be done by the logged in user. @@ -42,7 +42,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler; @@ -54,7 +54,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler; @@ -66,7 +66,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler; @@ -79,7 +79,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:404 message:"User not found" /// /// @return --(NSNumber*) deleteUserWithUsername: (NSString*) username +-(NSURLSessionTask*) deleteUserWithUsername: (NSString*) username completionHandler: (void (^)(NSError* error)) handler; @@ -93,7 +93,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:404 message:"User not found" /// /// @return SWGUser* --(NSNumber*) getUserByNameWithUsername: (NSString*) username +-(NSURLSessionTask*) getUserByNameWithUsername: (NSString*) username completionHandler: (void (^)(SWGUser* output, NSError* error)) handler; @@ -107,7 +107,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:400 message:"Invalid username/password supplied" /// /// @return NSString* --(NSNumber*) loginUserWithUsername: (NSString*) username +-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username password: (NSString*) password completionHandler: (void (^)(NSString* output, NSError* error)) handler; @@ -119,7 +119,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) logoutUserWithCompletionHandler: +-(NSURLSessionTask*) logoutUserWithCompletionHandler: (void (^)(NSError* error)) handler; @@ -133,7 +133,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:404 message:"User not found" /// /// @return --(NSNumber*) updateUserWithUsername: (NSString*) username +-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username body: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m index 6ffb578ed76..58e1729f490 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m @@ -5,7 +5,7 @@ @interface SWGUserApi () -@property (nonatomic, strong) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; @end @@ -19,19 +19,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; #pragma mark - Initialize methods - (instancetype) init { - self = [super init]; - if (self) { - SWGConfiguration *config = [SWGConfiguration sharedConfig]; - if (config.apiClient == nil) { - config.apiClient = [[SWGApiClient alloc] init]; - } - _apiClient = config.apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; - } - return self; + return [self initWithApiClient:[SWGApiClient sharedClient]]; } -- (id) initWithApiClient:(SWGApiClient *)apiClient { + +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient { self = [super init]; if (self) { _apiClient = apiClient; @@ -42,15 +34,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; #pragma mark - -+ (instancetype)sharedAPI { - static SWGUserApi *sharedAPI; - static dispatch_once_t once; - dispatch_once(&once, ^{ - sharedAPI = [[self alloc] init]; - }); - return sharedAPI; -} - -(NSString*) defaultHeaderForKey:(NSString*)key { return self.defaultHeaders[key]; } @@ -63,10 +46,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; [self.defaultHeaders setValue:value forKey:key]; } --(NSUInteger) requestQueueSize { - return [SWGApiClient requestQueueSize]; -} - #pragma mark - Api Methods /// @@ -76,7 +55,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"]; @@ -124,8 +103,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -135,7 +113,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"]; @@ -183,8 +161,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -194,7 +171,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"]; @@ -242,8 +219,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -253,7 +229,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) deleteUserWithUsername: (NSString*) username +-(NSURLSessionTask*) deleteUserWithUsername: (NSString*) username completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'username' is set if (username == nil) { @@ -314,8 +290,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -325,7 +300,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns SWGUser* /// --(NSNumber*) getUserByNameWithUsername: (NSString*) username +-(NSURLSessionTask*) getUserByNameWithUsername: (NSString*) username completionHandler: (void (^)(SWGUser* output, NSError* error)) handler { // verify the required parameter 'username' is set if (username == nil) { @@ -386,8 +361,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler((SWGUser*)data, error); } - } - ]; + }]; } /// @@ -399,7 +373,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns NSString* /// --(NSNumber*) loginUserWithUsername: (NSString*) username +-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username password: (NSString*) password completionHandler: (void (^)(NSString* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/login"]; @@ -453,8 +427,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler((NSString*)data, error); } - } - ]; + }]; } /// @@ -462,7 +435,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) logoutUserWithCompletionHandler: +-(NSURLSessionTask*) logoutUserWithCompletionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/logout"]; @@ -509,8 +482,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -522,7 +494,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) updateUserWithUsername: (NSString*) username +-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username body: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'username' is set @@ -585,8 +557,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.h index dd8e721b3b9..ace66ba3146 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.h @@ -1,5 +1,4 @@ #import -#import #import /** diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.m index cec8bdeea27..b544a1dae58 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.m @@ -1,3 +1,4 @@ +#import #import "JSONValueTransformer+ISO8601.h" @implementation JSONValueTransformer (ISO8601) diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h index 93b564be3d1..c02d289a336 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h @@ -28,15 +28,13 @@ @protocol SWGApi -@property(nonatomic, assign) SWGApiClient *apiClient; +@property(readonly, nonatomic, strong) SWGApiClient *apiClient; --(id) initWithApiClient:(SWGApiClient *)apiClient; +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient; -(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:"); -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; -(NSString*) defaultHeaderForKey:(NSString*)key; --(NSUInteger) requestQueueSize; - @end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h index 2ec5c9b0fcc..4f7a6fda11a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h @@ -1,13 +1,7 @@ -#import -#import #import -#import "SWGJSONResponseSerializer.h" -#import "SWGJSONRequestSerializer.h" -#import "SWGQueryParamCollection.h" #import "SWGConfiguration.h" #import "SWGResponseDeserializer.h" #import "SWGSanitizer.h" -#import "SWGLogger.h" /** * Swagger Petstore @@ -33,16 +27,6 @@ * limitations under the License. */ -#import "SWGCategory.h" -#import "SWGOrder.h" -#import "SWGPet.h" -#import "SWGTag.h" -#import "SWGUser.h" - - - -@class SWGConfiguration; - /** * A key for `NSError` user info dictionaries. * @@ -50,15 +34,15 @@ */ extern NSString *const SWGResponseObjectErrorKey; + @interface SWGApiClient : AFHTTPSessionManager +@property (nonatomic, strong, readonly) id configuration; + @property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property(nonatomic, assign) NSTimeInterval timeoutInterval; @property(nonatomic, readonly) NSOperationQueue* queue; -/// In order to ensure the HTTPResponseHeaders are correct, it is recommended to initialize one SWGApiClient instance per thread. -@property(nonatomic, readonly) NSDictionary* HTTPResponseHeaders; - @property(nonatomic, strong) id responseDeserializer; @property(nonatomic, strong) id sanitizer; @@ -74,13 +58,6 @@ extern NSString *const SWGResponseObjectErrorKey; */ +(void)setCacheEnabled:(BOOL) enabled; -/** - * Gets the request queue size - * - * @return The size of `queuedRequests` static variable. - */ -+(NSUInteger)requestQueueSize; - /** * Sets the client unreachable * @@ -109,27 +86,6 @@ extern NSString *const SWGResponseObjectErrorKey; */ +(AFNetworkReachabilityStatus) getReachabilityStatus; -/** - * Gets the next request id - * - * @return The next executed request id. - */ -+(NSNumber*) nextRequestId; - -/** - * Generates request id and add it to the queue - * - * @return The next executed request id. - */ -+(NSNumber*) queueRequest; - -/** - * Removes request id from the queue - * - * @param requestId The request which will be removed. - */ -+(void) cancelRequest:(NSNumber*)requestId; - /** * Customizes the behavior when the reachability changed * @@ -137,6 +93,11 @@ extern NSString *const SWGResponseObjectErrorKey; */ +(void) setReachabilityChangeBlock:(void(^)(int))changeBlock; +/** + * Gets client singleton instance + */ ++ (instancetype) sharedClient; + /** * Sets the api client reachability strategy */ @@ -162,6 +123,14 @@ extern NSString *const SWGResponseObjectErrorKey; queryParams:(NSDictionary **)querys WithAuthSettings:(NSArray *)authSettings; + +/** + * Initializes the session manager with a configuration. + * + * @param configuration The configuration implementation + */ +- (instancetype)initWithConfiguration:(id)configuration; + /** * Performs request * @@ -176,21 +145,21 @@ extern NSString *const SWGResponseObjectErrorKey; * @param responseContentType Response content-type. * @param completionBlock The block will be executed when the request completed. * - * @return The request id. + * @return The created session task. */ --(NSNumber*) requestWithPath:(NSString*) path - method:(NSString*) method - pathParams:(NSDictionary *) pathParams - queryParams:(NSDictionary*) queryParams - formParams:(NSDictionary *) formParams - files:(NSDictionary *) files - body:(id) body - headerParams:(NSDictionary*) headerParams - authSettings:(NSArray *) authSettings - requestContentType:(NSString*) requestContentType - responseContentType:(NSString*) responseContentType - responseType:(NSString *) responseType - completionBlock:(void (^)(id, NSError *))completionBlock; +- (NSURLSessionTask*) requestWithPath: (NSString*) path + method: (NSString*) method + pathParams: (NSDictionary *) pathParams + queryParams: (NSDictionary*) queryParams + formParams: (NSDictionary *) formParams + files: (NSDictionary *) files + body: (id) body + headerParams: (NSDictionary*) headerParams + authSettings: (NSArray *) authSettings + requestContentType: (NSString*) requestContentType + responseContentType: (NSString*) responseContentType + responseType: (NSString *) responseType + completionBlock: (void (^)(id, NSError *))completionBlock; /** * Custom security policy @@ -199,12 +168,4 @@ extern NSString *const SWGResponseObjectErrorKey; */ - (AFSecurityPolicy *) customSecurityPolicy; -/** - * SWGConfiguration return sharedConfig - * - * @return SWGConfiguration - */ -- (SWGConfiguration*) configuration; - - @end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m index f004200b2eb..d4758d36b03 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m @@ -1,10 +1,16 @@ +#import + #import "SWGApiClient.h" +#import "SWGJSONRequestSerializer.h" +#import "SWGJSONResponseSerializer.h" +#import "SWGQueryParamCollection.h" +#import "SWGDefaultConfiguration.h" + + NSString *const SWGResponseObjectErrorKey = @"SWGResponseObject"; -static NSUInteger requestId = 0; static bool offlineState = false; -static NSMutableSet * queuedRequests = nil; static bool cacheEnabled = false; static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable; static void (^reachabilityChangeBlock)(int); @@ -36,38 +42,61 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { @interface SWGApiClient () -@property (nonatomic, strong) NSDictionary* HTTPResponseHeaders; +@property (nonatomic, strong, readwrite) id configuration; @end @implementation SWGApiClient +#pragma mark - Singleton Methods + ++ (instancetype) sharedClient { + static SWGApiClient *sharedClient = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedClient = [[self alloc] init]; + }); + return sharedClient; +} + +#pragma mark - Initialize Methods + - (instancetype)init { - NSString *baseUrl = [[SWGConfiguration sharedConfig] host]; - return [self initWithBaseURL:[NSURL URLWithString:baseUrl]]; + + return [self initWithConfiguration:[SWGDefaultConfiguration sharedConfig]]; } - (instancetype)initWithBaseURL:(NSURL *)url { + + return [self initWithBaseURL:url + configuration:[SWGDefaultConfiguration sharedConfig]]; + +} + +- (instancetype)initWithConfiguration:(id)configuration { + + return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url + configuration:(id)configuration { + self = [super initWithBaseURL:url]; if (self) { - self.timeoutInterval = 60; + _configuration = configuration; + _timeoutInterval = 60; + _responseDeserializer = [[SWGResponseDeserializer alloc] init]; + _sanitizer = [[SWGSanitizer alloc] init]; + self.requestSerializer = [AFJSONRequestSerializer serializer]; self.responseSerializer = [AFJSONResponseSerializer serializer]; self.securityPolicy = [self customSecurityPolicy]; - self.responseDeserializer = [[SWGResponseDeserializer alloc] init]; - self.sanitizer = [[SWGSanitizer alloc] init]; + // configure reachability [self configureCacheReachibility]; } - return self; -} -+ (void)initialize { - if (self == [SWGApiClient class]) { - queuedRequests = [[NSMutableSet alloc] init]; - // initialize URL cache - [self configureCacheWithMemoryAndDiskCapacity:4*1024*1024 diskSize:32*1024*1024]; - } + return self; } #pragma mark - Setter Methods @@ -113,43 +142,6 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [NSURLCache setSharedURLCache:cache]; } -#pragma mark - Request Methods - -+(NSUInteger)requestQueueSize { - return [queuedRequests count]; -} - -+(NSNumber*) nextRequestId { - @synchronized(self) { - return @(++requestId); - } -} - -+(NSNumber*) queueRequest { - NSNumber* requestId = [[self class] nextRequestId]; - SWGDebugLog(@"added %@ to request queue", requestId); - [queuedRequests addObject:requestId]; - return requestId; -} - -+(void) cancelRequest:(NSNumber*)requestId { - [queuedRequests removeObject:requestId]; -} - --(Boolean) executeRequestWithId:(NSNumber*) requestId { - NSSet* matchingItems = [queuedRequests objectsPassingTest:^BOOL(id obj, BOOL *stop) { - return [obj intValue] == [requestId intValue]; - }]; - - if (matchingItems.count == 1) { - SWGDebugLog(@"removed request id %@", requestId); - [queuedRequests removeObject:requestId]; - return YES; - } else { - return NO; - } -} - #pragma mark - Reachability Methods +(AFNetworkReachabilityStatus) getReachabilityStatus { @@ -179,23 +171,19 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [self.reachabilityManager startMonitoring]; } -#pragma mark - Operation Methods +#pragma mark - Task Methods -- (void) operationWithCompletionBlock: (NSURLRequest *)request - requestId: (NSNumber *) requestId - completionBlock: (void (^)(id, NSError *))completionBlock { - __weak __typeof(self)weakSelf = self; - NSURLSessionDataTask* op = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if (![strongSelf executeRequestWithId:requestId]) { - return; - } +- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request + completionBlock: (void (^)(id, NSError *))completionBlock { + + NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { SWGDebugLogResponse(response, responseObject,request,error); - strongSelf.HTTPResponseHeaders = SWG__headerFieldsForResponse(response); + if(!error) { completionBlock(responseObject, nil); return; } + NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { // Add in the (parsed) response body. @@ -204,20 +192,18 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); }]; - [op resume]; + + return task; } -- (void) downloadOperationWithCompletionBlock: (NSURLRequest *)request - requestId: (NSNumber *) requestId - completionBlock: (void (^)(id, NSError *))completionBlock { - __weak __typeof(self)weakSelf = self; - NSURLSessionDataTask* op = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if (![strongSelf executeRequestWithId:requestId]) { - return; - } - strongSelf.HTTPResponseHeaders = SWG__headerFieldsForResponse(response); +- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request + completionBlock: (void (^)(id, NSError *))completionBlock { + + id config = self.configuration; + + NSURLSessionDataTask* task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { SWGDebugLogResponse(response, responseObject,request,error); + if(error) { NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { @@ -226,8 +212,9 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); } - NSString *directory = [self configuration].tempFolderPath ?: NSTemporaryDirectory(); - NSString * filename = SWG__fileNameForResponse(response); + + NSString *directory = config.tempFolderPath ?: NSTemporaryDirectory(); + NSString *filename = SWG__fileNameForResponse(response); NSString *filepath = [directory stringByAppendingPathComponent:filename]; NSURL *file = [NSURL fileURLWithPath:filepath]; @@ -236,24 +223,26 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { completionBlock(file, nil); }]; - [op resume]; + + return task; } -#pragma mark - Perform Request Methods +#pragma mark - Perform Request Methods + +- (NSURLSessionTask*) requestWithPath: (NSString*) path + method: (NSString*) method + pathParams: (NSDictionary *) pathParams + queryParams: (NSDictionary*) queryParams + formParams: (NSDictionary *) formParams + files: (NSDictionary *) files + body: (id) body + headerParams: (NSDictionary*) headerParams + authSettings: (NSArray *) authSettings + requestContentType: (NSString*) requestContentType + responseContentType: (NSString*) responseContentType + responseType: (NSString *) responseType + completionBlock: (void (^)(id, NSError *))completionBlock { --(NSNumber*) requestWithPath: (NSString*) path - method: (NSString*) method - pathParams: (NSDictionary *) pathParams - queryParams: (NSDictionary*) queryParams - formParams: (NSDictionary *) formParams - files: (NSDictionary *) files - body: (id) body - headerParams: (NSDictionary*) headerParams - authSettings: (NSArray *) authSettings - requestContentType: (NSString*) requestContentType - responseContentType: (NSString*) responseContentType - responseType: (NSString *) responseType - completionBlock: (void (^)(id, NSError *))completionBlock { // setting request serializer if ([requestContentType isEqualToString:@"application/json"]) { self.requestSerializer = [SWGJSONRequestSerializer serializer]; @@ -359,14 +348,16 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [self postProcessRequest:request]; - NSNumber* requestId = [SWGApiClient queueRequest]; + + NSURLSessionTask *task = nil; + if ([responseType isEqualToString:@"NSURL*"] || [responseType isEqualToString:@"NSURL"]) { - [self downloadOperationWithCompletionBlock:request requestId:requestId completionBlock:^(id data, NSError *error) { + task = [self downloadTaskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { completionBlock(data, error); }]; } else { - [self operationWithCompletionBlock:request requestId:requestId completionBlock:^(id data, NSError *error) { + task = [self taskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { NSError * serializationError; id response = [self.responseDeserializer deserialize:data class:responseType error:&serializationError]; if(!response && !error){ @@ -375,7 +366,10 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { completionBlock(response, error); }]; } - return requestId; + + [task resume]; + + return task; } //Added for easier override to modify request @@ -455,10 +449,11 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSMutableDictionary *headersWithAuth = [NSMutableDictionary dictionaryWithDictionary:*headers]; NSMutableDictionary *querysWithAuth = [NSMutableDictionary dictionaryWithDictionary:*querys]; - - NSDictionary* configurationAuthSettings = [[self configuration] authSettings]; + + id config = self.configuration; for (NSString *auth in authSettings) { - NSDictionary *authSetting = configurationAuthSettings[auth]; + NSDictionary *authSetting = config.authSettings[auth]; + if(!authSetting) { // auth setting is set only if the key is non-empty continue; } @@ -479,11 +474,11 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { - (AFSecurityPolicy *) customSecurityPolicy { AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; - SWGConfiguration *config = [self configuration]; + id config = self.configuration; if (config.sslCaCert) { NSData *certData = [NSData dataWithContentsOfFile:config.sslCaCert]; - [securityPolicy setPinnedCertificates:@[certData]]; + [securityPolicy setPinnedCertificates:[NSSet setWithObject:certData]]; } if (config.verifySSL) { @@ -497,8 +492,4 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { return securityPolicy; } -- (SWGConfiguration*) configuration { - return [SWGConfiguration sharedConfig]; -} - @end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGBasicAuthTokenProvider.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGBasicAuthTokenProvider.h new file mode 100644 index 00000000000..6c50d3750b4 --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGBasicAuthTokenProvider.h @@ -0,0 +1,14 @@ +/** The `SWGBasicAuthTokenProvider` class creates a basic auth token from username and password. + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +#import + +@interface SWGBasicAuthTokenProvider : NSObject + ++ (NSString *)createBasicAuthTokenWithUsername:(NSString *)username password:(NSString *)password; + +@end \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGBasicAuthTokenProvider.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGBasicAuthTokenProvider.m new file mode 100644 index 00000000000..3788009ec58 --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGBasicAuthTokenProvider.m @@ -0,0 +1,19 @@ +#import "SWGBasicAuthTokenProvider.h" + +@implementation SWGBasicAuthTokenProvider + ++ (NSString *)createBasicAuthTokenWithUsername:(NSString *)username password:(NSString *)password { + + // return empty string if username and password are empty + if (username.length == 0 && password.length == 0){ + return @""; + } + + NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password]; + NSData *data = [basicAuthCredentials dataUsingEncoding:NSUTF8StringEncoding]; + basicAuthCredentials = [NSString stringWithFormat:@"Basic %@", [data base64EncodedStringWithOptions:0]]; + + return basicAuthCredentials; +} + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h index b6c37405ca2..a85a47d4bc8 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h @@ -1,5 +1,4 @@ #import -#import "SWGApiClient.h" #import "SWGLogger.h" /** @@ -26,157 +25,73 @@ * limitations under the License. */ -@class SWGApiClient; - -@interface SWGConfiguration : NSObject +@protocol SWGConfiguration /** - * Default api logger + * Api logger */ -@property (nonatomic, strong) SWGLogger * logger; +@property (readonly, nonatomic) SWGLogger *logger; /** - * Default api client + * Base url */ -@property (nonatomic) SWGApiClient *apiClient; - -/** - * Default base url - */ -@property (nonatomic) NSString *host; +@property (readonly, nonatomic) NSString *host; /** * Api key values for Api Key type Authentication - * - * To add or remove api key, use `setApiKey:forApiKeyIdentifier:`. */ -@property (readonly, nonatomic, strong) NSDictionary *apiKey; +@property (readonly, nonatomic) NSDictionary *apiKey; /** * Api key prefix values to be prepend to the respective api key - * - * To add or remove prefix, use `setApiKeyPrefix:forApiKeyPrefixIdentifier:`. */ -@property (readonly, nonatomic, strong) NSDictionary *apiKeyPrefix; +@property (readonly, nonatomic) NSDictionary *apiKeyPrefix; /** * Username for HTTP Basic Authentication */ - @property (nonatomic) NSString *username; +@property (readonly, nonatomic) NSString *username; /** * Password for HTTP Basic Authentication */ -@property (nonatomic) NSString *password; +@property (readonly, nonatomic) NSString *password; /** * Access token for OAuth */ -@property (nonatomic) NSString *accessToken; +@property (readonly, nonatomic) NSString *accessToken; /** * Temp folder for file download */ -@property (nonatomic) NSString *tempFolderPath; +@property (readonly, nonatomic) NSString *tempFolderPath; /** * Debug switch, default false */ -@property (nonatomic) BOOL debug; - -/** - * Gets configuration singleton instance - */ -+ (instancetype) sharedConfig; +@property (readonly, nonatomic) BOOL debug; /** * SSL/TLS verification * Set this to NO to skip verifying SSL certificate when calling API from https server */ -@property (nonatomic) BOOL verifySSL; +@property (readonly, nonatomic) BOOL verifySSL; /** * SSL/TLS verification * Set this to customize the certificate file to verify the peer */ -@property (nonatomic) NSString *sslCaCert; +@property (readonly, nonatomic) NSString *sslCaCert; /** - * Sets API key - * - * To remove a apiKey for an identifier, just set the apiKey to nil. - * - * @param apiKey API key or token. - * @param identifier API key identifier (authentication schema). - * + * Authentication Settings */ -- (void) setApiKey:(NSString *)apiKey forApiKeyIdentifier:(NSString*)identifier; - -/** - * Removes api key - * - * @param identifier API key identifier. - */ -- (void) removeApiKey:(NSString *)identifier; - -/** - * Sets the prefix for API key - * - * @param apiKeyPrefix API key prefix. - * @param identifier API key identifier. - */ -- (void) setApiKeyPrefix:(NSString *)prefix forApiKeyPrefixIdentifier:(NSString *)identifier; - -/** - * Removes api key prefix - * - * @param identifier API key identifier. - */ -- (void) removeApiKeyPrefix:(NSString *)identifier; - -/** - * Gets API key (with prefix if set) - */ -- (NSString *) getApiKeyWithPrefix:(NSString *) key; - -/** - * Gets Basic Auth token - */ -- (NSString *) getBasicAuthToken; - -/** - * Gets OAuth access token - */ -- (NSString *) getAccessToken; - -/** - * Gets Authentication Settings - */ -- (NSDictionary *) authSettings; +@property (readonly, nonatomic) NSDictionary *authSettings; /** * Default headers for all services */ @property (readonly, nonatomic, strong) NSDictionary *defaultHeaders; -/** -* Removes header from defaultHeaders -* -* @param Header name. -*/ --(void) removeDefaultHeaderForKey:(NSString*)key; - -/** -* Sets the header for key -* -* @param value Value for header name -* @param key Header name -*/ --(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; - -/** -* @param Header key name. -*/ --(NSString*) defaultHeaderForKey:(NSString*)key; - -@end +@end \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h new file mode 100644 index 00000000000..cd44d30e551 --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -0,0 +1,175 @@ +#import +#import "SWGConfiguration.h" + +/** +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +@interface SWGDefaultConfiguration : NSObject + + +/** + * Default api logger + */ +@property (nonatomic, strong) SWGLogger * logger; + +/** + * Default base url + */ +@property (nonatomic) NSString *host; + +/** + * Api key values for Api Key type Authentication + * + * To add or remove api key, use `setApiKey:forApiKeyIdentifier:`. + */ +@property (readonly, nonatomic, strong) NSDictionary *apiKey; + +/** + * Api key prefix values to be prepend to the respective api key + * + * To add or remove prefix, use `setApiKeyPrefix:forApiKeyPrefixIdentifier:`. + */ +@property (readonly, nonatomic, strong) NSDictionary *apiKeyPrefix; + +/** + * Username for HTTP Basic Authentication + */ + @property (nonatomic) NSString *username; + +/** + * Password for HTTP Basic Authentication + */ +@property (nonatomic) NSString *password; + +/** + * Access token for OAuth + */ +@property (nonatomic) NSString *accessToken; + +/** + * Temp folder for file download + */ +@property (nonatomic) NSString *tempFolderPath; + +/** + * Debug switch, default false + */ +@property (nonatomic) BOOL debug; + +/** + * Gets configuration singleton instance + */ ++ (instancetype) sharedConfig; + +/** + * SSL/TLS verification + * Set this to NO to skip verifying SSL certificate when calling API from https server + */ +@property (nonatomic) BOOL verifySSL; + +/** + * SSL/TLS verification + * Set this to customize the certificate file to verify the peer + */ +@property (nonatomic) NSString *sslCaCert; + +/** + * Sets API key + * + * To remove a apiKey for an identifier, just set the apiKey to nil. + * + * @param apiKey API key or token. + * @param identifier API key identifier (authentication schema). + * + */ +- (void) setApiKey:(NSString *)apiKey forApiKeyIdentifier:(NSString*)identifier; + +/** + * Removes api key + * + * @param identifier API key identifier. + */ +- (void) removeApiKey:(NSString *)identifier; + +/** + * Sets the prefix for API key + * + * @param apiKeyPrefix API key prefix. + * @param identifier API key identifier. + */ +- (void) setApiKeyPrefix:(NSString *)prefix forApiKeyPrefixIdentifier:(NSString *)identifier; + +/** + * Removes api key prefix + * + * @param identifier API key identifier. + */ +- (void) removeApiKeyPrefix:(NSString *)identifier; + +/** + * Gets API key (with prefix if set) + */ +- (NSString *) getApiKeyWithPrefix:(NSString *) key; + +/** + * Gets Basic Auth token + */ +- (NSString *) getBasicAuthToken; + +/** + * Gets OAuth access token + */ +- (NSString *) getAccessToken; + +/** + * Gets Authentication Settings + */ +- (NSDictionary *) authSettings; + +/** +* Default headers for all services +*/ +@property (readonly, nonatomic, strong) NSDictionary *defaultHeaders; + +/** +* Removes header from defaultHeaders +* +* @param Header name. +*/ +-(void) removeDefaultHeaderForKey:(NSString*)key; + +/** +* Sets the header for key +* +* @param value Value for header name +* @param key Header name +*/ +-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; + +/** +* @param Header key name. +*/ +-(NSString*) defaultHeaderForKey:(NSString*)key; + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m similarity index 72% rename from samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.m rename to samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m index b21290068a1..cd37ae35859 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m @@ -1,6 +1,7 @@ -#import "SWGConfiguration.h" +#import "SWGDefaultConfiguration.h" +#import "SWGBasicAuthTokenProvider.h" -@interface SWGConfiguration () +@interface SWGDefaultConfiguration () @property (nonatomic, strong) NSMutableDictionary *mutableDefaultHeaders; @property (nonatomic, strong) NSMutableDictionary *mutableApiKey; @@ -8,12 +9,12 @@ @end -@implementation SWGConfiguration +@implementation SWGDefaultConfiguration #pragma mark - Singleton Methods + (instancetype) sharedConfig { - static SWGConfiguration *shardConfig = nil; + static SWGDefaultConfiguration *shardConfig = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ shardConfig = [[self alloc] init]; @@ -26,17 +27,16 @@ - (instancetype) init { self = [super init]; if (self) { - self.apiClient = nil; - self.host = @"http://petstore.swagger.io/v2"; - self.username = @""; - self.password = @""; - self.accessToken= @""; - self.verifySSL = YES; - self.mutableApiKey = [NSMutableDictionary dictionary]; - self.mutableApiKeyPrefix = [NSMutableDictionary dictionary]; - self.mutableDefaultHeaders = [NSMutableDictionary dictionary]; - self.mutableDefaultHeaders[@"User-Agent"] = [NSString stringWithFormat:@"Swagger-Codegen/1.0.0/objc (%@; iOS %@; Scale/%0.2f)",[[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; - self.logger = [SWGLogger sharedLogger]; + _host = @"http://petstore.swagger.io/v2"; + _username = @""; + _password = @""; + _accessToken= @""; + _verifySSL = YES; + _mutableApiKey = [NSMutableDictionary dictionary]; + _mutableApiKeyPrefix = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; + ; + _logger = [SWGLogger sharedLogger]; } return self; } @@ -58,16 +58,9 @@ } - (NSString *) getBasicAuthToken { - // return empty string if username and password are empty - if (self.username.length == 0 && self.password.length == 0){ - return @""; - } - NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", self.username, self.password]; - NSData *data = [basicAuthCredentials dataUsingEncoding:NSUTF8StringEncoding]; - basicAuthCredentials = [NSString stringWithFormat:@"Basic %@", [data base64EncodedStringWithOptions:0]]; - - return basicAuthCredentials; + NSString *basicAuthToken = [SWGBasicAuthTokenProvider createBasicAuthTokenWithUsername:self.username password:self.password]; + return basicAuthToken; } - (NSString *) getAccessToken { @@ -110,13 +103,6 @@ - (NSDictionary *) authSettings { return @{ - @"api_key": - @{ - @"type": @"api_key", - @"in": @"header", - @"key": @"api_key", - @"value": [self getApiKeyWithPrefix:@"api_key"] - }, @"petstore_auth": @{ @"type": @"oauth", @@ -124,6 +110,13 @@ @"key": @"Authorization", @"value": [self getAccessToken] }, + @"api_key": + @{ + @"type": @"api_key", + @"in": @"header", + @"key": @"api_key", + @"value": [self getApiKeyWithPrefix:@"api_key"] + }, }; } diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.m index 8085c404f7e..db970d34669 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.m @@ -2,6 +2,35 @@ @implementation SWGObject +/** + * Workaround for JSONModel multithreading issues + * https://github.com/icanzilb/JSONModel/issues/441 + */ +- (instancetype)initWithDictionary:(NSDictionary *)dict error:(NSError **)err { + static NSMutableSet *classNames; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + classNames = [NSMutableSet new]; + }); + + BOOL initSync; + @synchronized([self class]) + { + NSString *className = NSStringFromClass([self class]); + initSync = ![classNames containsObject:className]; + if(initSync) + { + [classNames addObject:className]; + self = [super initWithDictionary:dict error:err]; + } + } + if(!initSync) + { + self = [super initWithDictionary:dict error:err]; + } + return self; +} + /** * Gets the string presentation of the object. * This method will be called when logging model object using `NSLog`. diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.m index 83303045185..9aa8a091762 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.m @@ -5,11 +5,15 @@ @synthesize values = _values; @synthesize format = _format; -- (id) initWithValuesAndFormat: (NSArray*) values - format: (NSString*) format { - _values = values; - _format = format; +- (id)initWithValuesAndFormat:(NSArray *)values + format:(NSString *)format { + self = [super init]; + if (self) { + _values = values; + _format = format; + } + return self; } diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj index 68c3e696436..bbdc648f467 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -1,621 +1,1440 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */; }; - 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; - 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; - 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; - 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; - 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; - 6003F59E195388D20070C39A /* SWGAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* SWGAppDelegate.m */; }; - 6003F5A7195388D20070C39A /* SWGViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* SWGViewController.m */; }; - 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; - 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; - 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; - 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; - 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */; }; - B2ADC0B1C8A60A05C48B4DF7 /* DatabaseHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */; }; - B2ADC17C287DCABF329BA8AC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC7027D4B025ABCA7999F /* Main.storyboard */; }; - B2ADC2D632658A5F73C6CE66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC65E342ADA697322D68C /* Images.xcassets */; }; - B2ADC3C7634D15595DD14814 /* BuildersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = B2ADC838FCC22F4BC6C41106 /* BuildersTest.m */; }; - B2ADC56977372855A63F4E4D /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6003F582195388D10070C39A /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6003F589195388D20070C39A; - remoteInfo = SwaggerClient; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig"; sourceTree = ""; }; - 4CCE21315897B7D544C83242 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - 6003F58A195388D20070C39A /* SwaggerClient_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 6003F595195388D20070C39A /* SwaggerClient-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SwaggerClient-Info.plist"; sourceTree = ""; }; - 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6003F59B195388D20070C39A /* SwaggerClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwaggerClient-Prefix.pch"; sourceTree = ""; }; - 6003F59C195388D20070C39A /* SWGAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWGAppDelegate.h; sourceTree = ""; }; - 6003F59D195388D20070C39A /* SWGAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SWGAppDelegate.m; sourceTree = ""; }; - 6003F5A5195388D20070C39A /* SWGViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWGViewController.h; sourceTree = ""; }; - 6003F5A6195388D20070C39A /* SWGViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SWGViewController.m; sourceTree = ""; }; - 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClient_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; - 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; - 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig"; sourceTree = ""; }; - 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "SwaggerClient/Launch Screen.storyboard"; sourceTree = ""; }; - B2ADC2F3483B3117A00FA91C /* DatabaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseHelper.h; sourceTree = ""; }; - B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatabaseHelper.m; sourceTree = ""; }; - B2ADC65E342ADA697322D68C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SwaggerClient/Images.xcassets; sourceTree = ""; }; - B2ADC7027D4B025ABCA7999F /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Main.storyboard; path = SwaggerClient/Main.storyboard; sourceTree = ""; }; - B2ADC838FCC22F4BC6C41106 /* BuildersTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuildersTest.m; sourceTree = ""; }; - BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig"; sourceTree = ""; }; - E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig"; sourceTree = ""; }; - E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwaggerClient.podspec; path = ../SwaggerClient.podspec; sourceTree = ""; }; - FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 6003F587195388D20070C39A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, - 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, - 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AB195388D20070C39A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, - 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, - 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, - 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 6003F581195388D10070C39A = { - isa = PBXGroup; - children = ( - 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, - 6003F593195388D20070C39A /* Example for SwaggerClient */, - 6003F5B5195388D20070C39A /* Tests */, - 6003F58C195388D20070C39A /* Frameworks */, - 6003F58B195388D20070C39A /* Products */, - CCE77F10C6D41F74B075ECD0 /* Pods */, - ); - sourceTree = ""; - }; - 6003F58B195388D20070C39A /* Products */ = { - isa = PBXGroup; - children = ( - 6003F58A195388D20070C39A /* SwaggerClient_Example.app */, - 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */, - B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */, - ); - name = Products; - sourceTree = ""; - }; - 6003F58C195388D20070C39A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6003F58D195388D20070C39A /* Foundation.framework */, - 6003F58F195388D20070C39A /* CoreGraphics.framework */, - 6003F591195388D20070C39A /* UIKit.framework */, - 6003F5AF195388D20070C39A /* XCTest.framework */, - 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */, - FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6003F593195388D20070C39A /* Example for SwaggerClient */ = { - isa = PBXGroup; - children = ( - 6003F59C195388D20070C39A /* SWGAppDelegate.h */, - 6003F59D195388D20070C39A /* SWGAppDelegate.m */, - 6003F5A5195388D20070C39A /* SWGViewController.h */, - 6003F5A6195388D20070C39A /* SWGViewController.m */, - 6003F594195388D20070C39A /* Supporting Files */, - ); - name = "Example for SwaggerClient"; - path = SwaggerClient; - sourceTree = ""; - }; - 6003F594195388D20070C39A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 6003F595195388D20070C39A /* SwaggerClient-Info.plist */, - 6003F596195388D20070C39A /* InfoPlist.strings */, - 6003F599195388D20070C39A /* main.m */, - 6003F59B195388D20070C39A /* SwaggerClient-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 6003F5B5195388D20070C39A /* Tests */ = { - isa = PBXGroup; - children = ( - 6003F5B6195388D20070C39A /* Supporting Files */, - B2ADC838FCC22F4BC6C41106 /* BuildersTest.m */, - B2ADCA62DE4AC0F5BAB42208 /* Helpers */, - ); - path = Tests; - sourceTree = ""; - }; - 6003F5B6195388D20070C39A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 6003F5B7195388D20070C39A /* Tests-Info.plist */, - 6003F5B8195388D20070C39A /* InfoPlist.strings */, - 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { - isa = PBXGroup; - children = ( - E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */, - 4CCE21315897B7D544C83242 /* README.md */, - B2ADC7027D4B025ABCA7999F /* Main.storyboard */, - B2ADC65E342ADA697322D68C /* Images.xcassets */, - ); - name = "Podspec Metadata"; - sourceTree = ""; - }; - B2ADCA62DE4AC0F5BAB42208 /* Helpers */ = { - isa = PBXGroup; - children = ( - B2ADC2F3483B3117A00FA91C /* DatabaseHelper.h */, - B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */, - ); - path = Helpers; - sourceTree = ""; - }; - CCE77F10C6D41F74B075ECD0 /* Pods */ = { - isa = PBXGroup; - children = ( - E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */, - BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */, - 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */, - 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 6003F589195388D20070C39A /* SwaggerClient_Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */; - buildPhases = ( - 799E7E29D924C30424DFBA28 /* 📦 Check Pods Manifest.lock */, - 6003F586195388D20070C39A /* Sources */, - 6003F587195388D20070C39A /* Frameworks */, - 6003F588195388D20070C39A /* Resources */, - 429AF5C69E165ED75311B4B0 /* 📦 Copy Pods Resources */, - 183E54C09C54DAEB54B2546F /* 📦 Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SwaggerClient_Example; - productName = SwaggerClient; - productReference = 6003F58A195388D20070C39A /* SwaggerClient_Example.app */; - productType = "com.apple.product-type.application"; - }; - 6003F5AD195388D20070C39A /* SwaggerClient_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */; - buildPhases = ( - 7B069562A9F91E498732474F /* 📦 Check Pods Manifest.lock */, - 6003F5AA195388D20070C39A /* Sources */, - 6003F5AB195388D20070C39A /* Frameworks */, - 6003F5AC195388D20070C39A /* Resources */, - E337D7E459CCFFDF27046FFC /* 📦 Copy Pods Resources */, - 111D7956304BD6E860AA8709 /* 📦 Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6003F5B4195388D20070C39A /* PBXTargetDependency */, - ); - name = SwaggerClient_Tests; - productName = SwaggerClientTests; - productReference = 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 6003F582195388D10070C39A /* Project object */ = { - isa = PBXProject; - attributes = { - CLASSPREFIX = SWG; - LastUpgradeCheck = 0510; - ORGANIZATIONNAME = geekerzp; - }; - buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 6003F581195388D10070C39A; - productRefGroup = 6003F58B195388D20070C39A /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 6003F589195388D20070C39A /* SwaggerClient_Example */, - 6003F5AD195388D20070C39A /* SwaggerClient_Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 6003F588195388D20070C39A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, - B2ADC17C287DCABF329BA8AC /* Main.storyboard in Resources */, - B2ADC2D632658A5F73C6CE66 /* Images.xcassets in Resources */, - B2ADC56977372855A63F4E4D /* Launch Screen.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AC195388D20070C39A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 111D7956304BD6E860AA8709 /* 📦 Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 183E54C09C54DAEB54B2546F /* 📦 Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 429AF5C69E165ED75311B4B0 /* 📦 Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 799E7E29D924C30424DFBA28 /* 📦 Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 7B069562A9F91E498732474F /* 📦 Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - E337D7E459CCFFDF27046FFC /* 📦 Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 6003F586195388D20070C39A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F59E195388D20070C39A /* SWGAppDelegate.m in Sources */, - 6003F5A7195388D20070C39A /* SWGViewController.m in Sources */, - 6003F59A195388D20070C39A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AA195388D20070C39A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B2ADC3C7634D15595DD14814 /* BuildersTest.m in Sources */, - B2ADC0B1C8A60A05C48B4DF7 /* DatabaseHelper.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 6003F589195388D20070C39A /* SwaggerClient_Example */; - targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 6003F596195388D20070C39A /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 6003F597195388D20070C39A /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 6003F5B9195388D20070C39A /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 6003F5BD195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - 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 = 7.1; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 6003F5BE195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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 = 7.1; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 6003F5C0195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SwaggerClient/SwaggerClient-Prefix.pch"; - INFOPLIST_FILE = "SwaggerClient/SwaggerClient-Info.plist"; - MODULE_NAME = ExampleApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 6003F5C1195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SwaggerClient/SwaggerClient-Prefix.pch"; - INFOPLIST_FILE = "SwaggerClient/SwaggerClient-Info.plist"; - MODULE_NAME = ExampleApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - 6003F5C3195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "Tests/Tests-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = xctest; - }; - name = Debug; - }; - 6003F5C4195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; - INFOPLIST_FILE = "Tests/Tests-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = xctest; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5BD195388D20070C39A /* Debug */, - 6003F5BE195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5C0195388D20070C39A /* Debug */, - 6003F5C1195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5C3195388D20070C39A /* Debug */, - 6003F5C4195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 6003F582195388D10070C39A /* Project object */; -} + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 111D7956304BD6E860AA8709 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh" + + showEnvVarsInLog + 0 + + 158CE3AA214CB1B31C7ADC48 + + fileRef + FDEF5BA3CF9CFFDEB5A47DB4 + isa + PBXBuildFile + + 183E54C09C54DAEB54B2546F + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh" + + showEnvVarsInLog + 0 + + 1A81C3BE3E54961CD827EAE3 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SwaggerClient_Tests.release.xcconfig + path + Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig + sourceTree + <group> + + 429AF5C69E165ED75311B4B0 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Copy Pods Resources + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh" + + showEnvVarsInLog + 0 + + 4CCE21315897B7D544C83242 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + net.daringfireball.markdown + name + README.md + path + ../README.md + sourceTree + <group> + + 6003F581195388D10070C39A + + children + + 60FF7A9C1954A5C5007DD14C + 6003F593195388D20070C39A + 6003F5B5195388D20070C39A + 6003F58C195388D20070C39A + 6003F58B195388D20070C39A + CCE77F10C6D41F74B075ECD0 + + isa + PBXGroup + sourceTree + <group> + + 6003F582195388D10070C39A + + attributes + + CLASSPREFIX + SWG + LastUpgradeCheck + 0510 + ORGANIZATIONNAME + geekerzp + + buildConfigurationList + 6003F585195388D10070C39A + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + Base + + mainGroup + 6003F581195388D10070C39A + productRefGroup + 6003F58B195388D20070C39A + projectDirPath + + projectReferences + + projectRoot + + targets + + 6003F589195388D20070C39A + 6003F5AD195388D20070C39A + + + 6003F585195388D10070C39A + + buildConfigurations + + 6003F5BD195388D20070C39A + 6003F5BE195388D20070C39A + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6003F586195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F59E195388D20070C39A + 6003F5A7195388D20070C39A + 6003F59A195388D20070C39A + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F587195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F590195388D20070C39A + 6003F592195388D20070C39A + 6003F58E195388D20070C39A + 94BE6BE84795B5034A811E61 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F588195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F598195388D20070C39A + B2ADC17C287DCABF329BA8AC + B2ADC2D632658A5F73C6CE66 + B2ADC56977372855A63F4E4D + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F589195388D20070C39A + + buildConfigurationList + 6003F5BF195388D20070C39A + buildPhases + + 799E7E29D924C30424DFBA28 + 6003F586195388D20070C39A + 6003F587195388D20070C39A + 6003F588195388D20070C39A + 429AF5C69E165ED75311B4B0 + 183E54C09C54DAEB54B2546F + FF3F107CF27E0A54D86C49F5 + + buildRules + + dependencies + + isa + PBXNativeTarget + name + SwaggerClient_Example + productName + SwaggerClient + productReference + 6003F58A195388D20070C39A + productType + com.apple.product-type.application + + 6003F58A195388D20070C39A + + explicitFileType + wrapper.application + includeInIndex + 0 + isa + PBXFileReference + path + SwaggerClient_Example.app + sourceTree + BUILT_PRODUCTS_DIR + + 6003F58B195388D20070C39A + + children + + 6003F58A195388D20070C39A + 6003F5AE195388D20070C39A + B2ADC084A2C0BDF217832B03 + + isa + PBXGroup + name + Products + sourceTree + <group> + + 6003F58C195388D20070C39A + + children + + 6003F58D195388D20070C39A + 6003F58F195388D20070C39A + 6003F591195388D20070C39A + 6003F5AF195388D20070C39A + 8D46325ECAD48245C07F6733 + FDEF5BA3CF9CFFDEB5A47DB4 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 6003F58D195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + System/Library/Frameworks/Foundation.framework + sourceTree + SDKROOT + + 6003F58E195388D20070C39A + + fileRef + 6003F58D195388D20070C39A + isa + PBXBuildFile + + 6003F58F195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + CoreGraphics.framework + path + System/Library/Frameworks/CoreGraphics.framework + sourceTree + SDKROOT + + 6003F590195388D20070C39A + + fileRef + 6003F58F195388D20070C39A + isa + PBXBuildFile + + 6003F591195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + UIKit.framework + path + System/Library/Frameworks/UIKit.framework + sourceTree + SDKROOT + + 6003F592195388D20070C39A + + fileRef + 6003F591195388D20070C39A + isa + PBXBuildFile + + 6003F593195388D20070C39A + + children + + 6003F59C195388D20070C39A + 6003F59D195388D20070C39A + 6003F5A5195388D20070C39A + 6003F5A6195388D20070C39A + 6003F594195388D20070C39A + + isa + PBXGroup + name + Example for SwaggerClient + path + SwaggerClient + sourceTree + <group> + + 6003F594195388D20070C39A + + children + + 6003F595195388D20070C39A + 6003F596195388D20070C39A + 6003F599195388D20070C39A + 6003F59B195388D20070C39A + + isa + PBXGroup + name + Supporting Files + sourceTree + <group> + + 6003F595195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + SwaggerClient-Info.plist + sourceTree + <group> + + 6003F596195388D20070C39A + + children + + 6003F597195388D20070C39A + + isa + PBXVariantGroup + name + InfoPlist.strings + sourceTree + <group> + + 6003F597195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + text.plist.strings + name + en + path + en.lproj/InfoPlist.strings + sourceTree + <group> + + 6003F598195388D20070C39A + + fileRef + 6003F596195388D20070C39A + isa + PBXBuildFile + + 6003F599195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + main.m + sourceTree + <group> + + 6003F59A195388D20070C39A + + fileRef + 6003F599195388D20070C39A + isa + PBXBuildFile + + 6003F59B195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + SwaggerClient-Prefix.pch + sourceTree + <group> + + 6003F59C195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + SWGAppDelegate.h + sourceTree + <group> + + 6003F59D195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + SWGAppDelegate.m + sourceTree + <group> + + 6003F59E195388D20070C39A + + fileRef + 6003F59D195388D20070C39A + isa + PBXBuildFile + + 6003F5A5195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + SWGViewController.h + sourceTree + <group> + + 6003F5A6195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + SWGViewController.m + sourceTree + <group> + + 6003F5A7195388D20070C39A + + fileRef + 6003F5A6195388D20070C39A + isa + PBXBuildFile + + 6003F5AA195388D20070C39A + + buildActionMask + 2147483647 + files + + B2ADC3C7634D15595DD14814 + B2ADC0B1C8A60A05C48B4DF7 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F5AB195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F5B0195388D20070C39A + 6003F5B2195388D20070C39A + 6003F5B1195388D20070C39A + 158CE3AA214CB1B31C7ADC48 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F5AC195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F5BA195388D20070C39A + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F5AD195388D20070C39A + + buildConfigurationList + 6003F5C2195388D20070C39A + buildPhases + + 7B069562A9F91E498732474F + 6003F5AA195388D20070C39A + 6003F5AB195388D20070C39A + 6003F5AC195388D20070C39A + E337D7E459CCFFDF27046FFC + 111D7956304BD6E860AA8709 + AA7CAD658C61D6EBA222B5F8 + + buildRules + + dependencies + + 6003F5B4195388D20070C39A + + isa + PBXNativeTarget + name + SwaggerClient_Tests + productName + SwaggerClientTests + productReference + 6003F5AE195388D20070C39A + productType + com.apple.product-type.bundle.unit-test + + 6003F5AE195388D20070C39A + + explicitFileType + wrapper.cfbundle + includeInIndex + 0 + isa + PBXFileReference + path + SwaggerClient_Tests.xctest + sourceTree + BUILT_PRODUCTS_DIR + + 6003F5AF195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + XCTest.framework + path + Library/Frameworks/XCTest.framework + sourceTree + DEVELOPER_DIR + + 6003F5B0195388D20070C39A + + fileRef + 6003F5AF195388D20070C39A + isa + PBXBuildFile + + 6003F5B1195388D20070C39A + + fileRef + 6003F58D195388D20070C39A + isa + PBXBuildFile + + 6003F5B2195388D20070C39A + + fileRef + 6003F591195388D20070C39A + isa + PBXBuildFile + + 6003F5B3195388D20070C39A + + containerPortal + 6003F582195388D10070C39A + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 6003F589195388D20070C39A + remoteInfo + SwaggerClient + + 6003F5B4195388D20070C39A + + isa + PBXTargetDependency + target + 6003F589195388D20070C39A + targetProxy + 6003F5B3195388D20070C39A + + 6003F5B5195388D20070C39A + + children + + 6003F5B6195388D20070C39A + B2ADC838FCC22F4BC6C41106 + B2ADCA62DE4AC0F5BAB42208 + + isa + PBXGroup + path + Tests + sourceTree + <group> + + 6003F5B6195388D20070C39A + + children + + 6003F5B7195388D20070C39A + 6003F5B8195388D20070C39A + 606FC2411953D9B200FFA9A0 + + isa + PBXGroup + name + Supporting Files + sourceTree + <group> + + 6003F5B7195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Tests-Info.plist + sourceTree + <group> + + 6003F5B8195388D20070C39A + + children + + 6003F5B9195388D20070C39A + + isa + PBXVariantGroup + name + InfoPlist.strings + sourceTree + <group> + + 6003F5B9195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + text.plist.strings + name + en + path + en.lproj/InfoPlist.strings + sourceTree + <group> + + 6003F5BA195388D20070C39A + + fileRef + 6003F5B8195388D20070C39A + isa + PBXBuildFile + + 6003F5BD195388D20070C39A + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + CLANG_WARN__DUPLICATE_METHOD_MATCH + YES + CODE_SIGN_IDENTITY[sdk=iphoneos*] + iPhone Developer + COPY_PHASE_STRIP + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + 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 + 7.1 + ONLY_ACTIVE_ARCH + YES + SDKROOT + iphoneos + TARGETED_DEVICE_FAMILY + 1,2 + + isa + XCBuildConfiguration + name + Debug + + 6003F5BE195388D20070C39A + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + CLANG_WARN__DUPLICATE_METHOD_MATCH + YES + CODE_SIGN_IDENTITY[sdk=iphoneos*] + iPhone Developer + COPY_PHASE_STRIP + YES + ENABLE_NS_ASSERTIONS + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + 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 + 7.1 + SDKROOT + iphoneos + TARGETED_DEVICE_FAMILY + 1,2 + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 6003F5BF195388D20070C39A + + buildConfigurations + + 6003F5C0195388D20070C39A + 6003F5C1195388D20070C39A + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6003F5C0195388D20070C39A + + baseConfigurationReference + E445A633FA767F207D7EE6CE + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME + LaunchImage + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + SwaggerClient/SwaggerClient-Prefix.pch + INFOPLIST_FILE + SwaggerClient/SwaggerClient-Info.plist + MODULE_NAME + ExampleApp + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + app + + isa + XCBuildConfiguration + name + Debug + + 6003F5C1195388D20070C39A + + baseConfigurationReference + BFB4BE760737508B3CFC23B2 + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME + LaunchImage + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + SwaggerClient/SwaggerClient-Prefix.pch + INFOPLIST_FILE + SwaggerClient/SwaggerClient-Info.plist + MODULE_NAME + ExampleApp + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + app + + isa + XCBuildConfiguration + name + Release + + 6003F5C2195388D20070C39A + + buildConfigurations + + 6003F5C3195388D20070C39A + 6003F5C4195388D20070C39A + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6003F5C3195388D20070C39A + + baseConfigurationReference + 73CCD82196AABD64F2807C7B + buildSettings + + FRAMEWORK_SEARCH_PATHS + + $(SDKROOT)/Developer/Library/Frameworks + $(inherited) + $(DEVELOPER_FRAMEWORKS_DIR) + + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Tests/Tests-Prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + INFOPLIST_FILE + Tests/Tests-Info.plist + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + xctest + + isa + XCBuildConfiguration + name + Debug + + 6003F5C4195388D20070C39A + + baseConfigurationReference + 1A81C3BE3E54961CD827EAE3 + buildSettings + + FRAMEWORK_SEARCH_PATHS + + $(SDKROOT)/Developer/Library/Frameworks + $(inherited) + $(DEVELOPER_FRAMEWORKS_DIR) + + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Tests/Tests-Prefix.pch + INFOPLIST_FILE + Tests/Tests-Info.plist + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + xctest + + isa + XCBuildConfiguration + name + Release + + 606FC2411953D9B200FFA9A0 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Tests-Prefix.pch + sourceTree + <group> + + 60FF7A9C1954A5C5007DD14C + + children + + E9675D953C6DCDE71A1BDFD4 + 4CCE21315897B7D544C83242 + B2ADC7027D4B025ABCA7999F + B2ADC65E342ADA697322D68C + + isa + PBXGroup + name + Podspec Metadata + sourceTree + <group> + + 73CCD82196AABD64F2807C7B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SwaggerClient_Tests.debug.xcconfig + path + Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig + sourceTree + <group> + + 799E7E29D924C30424DFBA28 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Check Pods Manifest.lock + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null +if [[ $? != 0 ]] ; then + cat << EOM +error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. +EOM + exit 1 +fi + + showEnvVarsInLog + 0 + + 7B069562A9F91E498732474F + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Check Pods Manifest.lock + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null +if [[ $? != 0 ]] ; then + cat << EOM +error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. +EOM + exit 1 +fi + + showEnvVarsInLog + 0 + + 8D46325ECAD48245C07F6733 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SwaggerClient_Example.a + sourceTree + BUILT_PRODUCTS_DIR + + 94BE6BE84795B5034A811E61 + + fileRef + 8D46325ECAD48245C07F6733 + isa + PBXBuildFile + + AA7CAD658C61D6EBA222B5F8 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh" + + showEnvVarsInLog + 0 + + B2ADC084A2C0BDF217832B03 + + isa + PBXFileReference + lastKnownFileType + file.storyboard + name + Launch Screen.storyboard + path + SwaggerClient/Launch Screen.storyboard + sourceTree + <group> + + B2ADC0B1C8A60A05C48B4DF7 + + fileRef + B2ADC55130D5E329ED945E8F + isa + PBXBuildFile + + B2ADC17C287DCABF329BA8AC + + fileRef + B2ADC7027D4B025ABCA7999F + isa + PBXBuildFile + + B2ADC2D632658A5F73C6CE66 + + fileRef + B2ADC65E342ADA697322D68C + isa + PBXBuildFile + + B2ADC2F3483B3117A00FA91C + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + DatabaseHelper.h + sourceTree + <group> + + B2ADC3C7634D15595DD14814 + + fileRef + B2ADC838FCC22F4BC6C41106 + isa + PBXBuildFile + + B2ADC55130D5E329ED945E8F + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + DatabaseHelper.m + sourceTree + <group> + + B2ADC56977372855A63F4E4D + + fileRef + B2ADC084A2C0BDF217832B03 + isa + PBXBuildFile + + B2ADC65E342ADA697322D68C + + isa + PBXFileReference + lastKnownFileType + folder.assetcatalog + name + Images.xcassets + path + SwaggerClient/Images.xcassets + sourceTree + <group> + + B2ADC7027D4B025ABCA7999F + + isa + PBXFileReference + lastKnownFileType + file.storyboard + name + Main.storyboard + path + SwaggerClient/Main.storyboard + sourceTree + <group> + + B2ADC838FCC22F4BC6C41106 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + BuildersTest.m + sourceTree + <group> + + B2ADCA62DE4AC0F5BAB42208 + + children + + B2ADC2F3483B3117A00FA91C + B2ADC55130D5E329ED945E8F + + isa + PBXGroup + path + Helpers + sourceTree + <group> + + BFB4BE760737508B3CFC23B2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SwaggerClient_Example.release.xcconfig + path + Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig + sourceTree + <group> + + CCE77F10C6D41F74B075ECD0 + + children + + E445A633FA767F207D7EE6CE + BFB4BE760737508B3CFC23B2 + 73CCD82196AABD64F2807C7B + 1A81C3BE3E54961CD827EAE3 + + isa + PBXGroup + name + Pods + sourceTree + <group> + + E337D7E459CCFFDF27046FFC + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Copy Pods Resources + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh" + + showEnvVarsInLog + 0 + + E445A633FA767F207D7EE6CE + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SwaggerClient_Example.debug.xcconfig + path + Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig + sourceTree + <group> + + E9675D953C6DCDE71A1BDFD4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + name + SwaggerClient.podspec + path + ../SwaggerClient.podspec + sourceTree + <group> + + FDEF5BA3CF9CFFDEB5A47DB4 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SwaggerClient_Tests.a + sourceTree + BUILT_PRODUCTS_DIR + + FF3F107CF27E0A54D86C49F5 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh" + + showEnvVarsInLog + 0 + + + rootObject + 6003F582195388D10070C39A + + diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient/SWGViewController.m b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient/SWGViewController.m index 7f8e3d67881..d1ee531e2f0 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient/SWGViewController.m +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient/SWGViewController.m @@ -10,7 +10,7 @@ #import #import #import -#import +#import @interface SWGViewController () @@ -22,7 +22,7 @@ { [super viewDidLoad]; - SWGConfiguration *config = [SWGConfiguration sharedConfig]; + SWGDefaultConfiguration *config = [SWGDefaultConfiguration sharedConfig]; config.debug = YES; SWGPetApi *api = [[SWGPetApi alloc] init]; diff --git a/samples/client/petstore/objc/default/README.md b/samples/client/petstore/objc/default/README.md index 808a950606e..3bf3052f514 100644 --- a/samples/client/petstore/objc/default/README.md +++ b/samples/client/petstore/objc/default/README.md @@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi - API version: 1.0.0 - Package version: -- Build date: 2016-07-19T16:53:24.981+08:00 +- Build date: 2016-08-04T12:24:22.869+02:00 - Build package: class io.swagger.codegen.languages.ObjcClientCodegen ## Requirements @@ -40,7 +40,7 @@ Import the following: ```objc #import -#import +#import // load models #import #import @@ -64,7 +64,7 @@ Please follow the [installation procedure](#installation--usage) and then run th ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; @@ -124,12 +124,6 @@ Class | Method | HTTP request | Description ## Documentation For Authorization -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - ## petstore_auth - **Type**: OAuth @@ -139,6 +133,12 @@ Class | Method | HTTP request | Description - **write:pets**: modify pets in your account - **read:pets**: read your pets +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + ## Author diff --git a/samples/client/petstore/objc/default/SwaggerClient.podspec b/samples/client/petstore/objc/default/SwaggerClient.podspec index 934e35a2a6b..32d8e336da7 100644 --- a/samples/client/petstore/objc/default/SwaggerClient.podspec +++ b/samples/client/petstore/objc/default/SwaggerClient.podspec @@ -32,6 +32,6 @@ Pod::Spec.new do |s| s.dependency 'AFNetworking', '~> 3' s.dependency 'JSONModel', '~> 1.2' - s.dependency 'ISO8601', '~> 0.5' + s.dependency 'ISO8601', '~> 0.6' end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h index 97f914a627e..ade955b27f8 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h @@ -32,7 +32,7 @@ extern NSString* kSWGPetApiErrorDomain; extern NSInteger kSWGPetApiMissingParamErrorCode; -+(instancetype) sharedAPI; +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient NS_DESIGNATED_INITIALIZER; /// Add a new pet to the store /// @@ -42,7 +42,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:405 message:"Invalid input" /// /// @return --(NSNumber*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler; @@ -55,7 +55,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:400 message:"Invalid pet value" /// /// @return --(NSNumber*) deletePetWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) deletePetWithPetId: (NSNumber*) petId apiKey: (NSString*) apiKey completionHandler: (void (^)(NSError* error)) handler; @@ -69,7 +69,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:400 message:"Invalid status value" /// /// @return NSArray* --(NSNumber*) findPetsByStatusWithStatus: (NSArray*) status +-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status completionHandler: (void (^)(NSArray* output, NSError* error)) handler; @@ -82,7 +82,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:400 message:"Invalid tag value" /// /// @return NSArray* --(NSNumber*) findPetsByTagsWithTags: (NSArray*) tags +-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags completionHandler: (void (^)(NSArray* output, NSError* error)) handler; @@ -96,7 +96,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:404 message:"Pet not found" /// /// @return SWGPet* --(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) getPetByIdWithPetId: (NSNumber*) petId completionHandler: (void (^)(SWGPet* output, NSError* error)) handler; @@ -110,7 +110,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:405 message:"Validation exception" /// /// @return --(NSNumber*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler; @@ -124,7 +124,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:405 message:"Invalid input" /// /// @return --(NSNumber*) updatePetWithFormWithPetId: (NSString*) petId +-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId name: (NSString*) name status: (NSString*) status completionHandler: (void (^)(NSError* error)) handler; @@ -140,7 +140,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) uploadFileWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId additionalMetadata: (NSString*) additionalMetadata file: (NSURL*) file completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m index e35421fc520..5551bffae9a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m @@ -5,7 +5,7 @@ @interface SWGPetApi () -@property (nonatomic, strong) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; @end @@ -19,19 +19,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; #pragma mark - Initialize methods - (instancetype) init { - self = [super init]; - if (self) { - SWGConfiguration *config = [SWGConfiguration sharedConfig]; - if (config.apiClient == nil) { - config.apiClient = [[SWGApiClient alloc] init]; - } - _apiClient = config.apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; - } - return self; + return [self initWithApiClient:[SWGApiClient sharedClient]]; } -- (id) initWithApiClient:(SWGApiClient *)apiClient { + +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient { self = [super init]; if (self) { _apiClient = apiClient; @@ -42,15 +34,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; #pragma mark - -+ (instancetype)sharedAPI { - static SWGPetApi *sharedAPI; - static dispatch_once_t once; - dispatch_once(&once, ^{ - sharedAPI = [[self alloc] init]; - }); - return sharedAPI; -} - -(NSString*) defaultHeaderForKey:(NSString*)key { return self.defaultHeaders[key]; } @@ -63,10 +46,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; [self.defaultHeaders setValue:value forKey:key]; } --(NSUInteger) requestQueueSize { - return [SWGApiClient requestQueueSize]; -} - #pragma mark - Api Methods /// @@ -76,7 +55,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -124,8 +103,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -137,7 +115,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) deletePetWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) deletePetWithPetId: (NSNumber*) petId apiKey: (NSString*) apiKey completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'petId' is set @@ -202,8 +180,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -213,7 +190,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns NSArray* /// --(NSNumber*) findPetsByStatusWithStatus: (NSArray*) status +-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status completionHandler: (void (^)(NSArray* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByStatus"]; @@ -264,8 +241,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler((NSArray*)data, error); } - } - ]; + }]; } /// @@ -275,7 +251,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns NSArray* /// --(NSNumber*) findPetsByTagsWithTags: (NSArray*) tags +-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags completionHandler: (void (^)(NSArray* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByTags"]; @@ -326,8 +302,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler((NSArray*)data, error); } - } - ]; + }]; } /// @@ -337,7 +312,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns SWGPet* /// --(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) getPetByIdWithPetId: (NSNumber*) petId completionHandler: (void (^)(SWGPet* output, NSError* error)) handler { // verify the required parameter 'petId' is set if (petId == nil) { @@ -376,7 +351,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; // Authentication setting - NSArray *authSettings = @[@"api_key", @"petstore_auth"]; + NSArray *authSettings = @[@"petstore_auth", @"api_key"]; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; @@ -398,8 +373,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler((SWGPet*)data, error); } - } - ]; + }]; } /// @@ -409,7 +383,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -457,8 +431,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -472,7 +445,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) updatePetWithFormWithPetId: (NSString*) petId +-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId name: (NSString*) name status: (NSString*) status completionHandler: (void (^)(NSError* error)) handler { @@ -541,8 +514,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -556,7 +528,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) uploadFileWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId additionalMetadata: (NSString*) additionalMetadata file: (NSURL*) file completionHandler: (void (^)(NSError* error)) handler { @@ -623,8 +595,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h index bbd588dba25..92aeefb176e 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h @@ -32,7 +32,7 @@ extern NSString* kSWGStoreApiErrorDomain; extern NSInteger kSWGStoreApiMissingParamErrorCode; -+(instancetype) sharedAPI; +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient NS_DESIGNATED_INITIALIZER; /// Delete purchase order by ID /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -43,7 +43,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// code:404 message:"Order not found" /// /// @return --(NSNumber*) deleteOrderWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) deleteOrderWithOrderId: (NSString*) orderId completionHandler: (void (^)(NSError* error)) handler; @@ -54,7 +54,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// code:200 message:"successful operation" /// /// @return NSDictionary* --(NSNumber*) getInventoryWithCompletionHandler: +-(NSURLSessionTask*) getInventoryWithCompletionHandler: (void (^)(NSDictionary* output, NSError* error)) handler; @@ -68,7 +68,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// code:404 message:"Order not found" /// /// @return SWGOrder* --(NSNumber*) getOrderByIdWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; @@ -81,7 +81,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// code:400 message:"Invalid Order" /// /// @return SWGOrder* --(NSNumber*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m index e5964200f20..a275c1f0568 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m @@ -5,7 +5,7 @@ @interface SWGStoreApi () -@property (nonatomic, strong) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; @end @@ -19,19 +19,11 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; #pragma mark - Initialize methods - (instancetype) init { - self = [super init]; - if (self) { - SWGConfiguration *config = [SWGConfiguration sharedConfig]; - if (config.apiClient == nil) { - config.apiClient = [[SWGApiClient alloc] init]; - } - _apiClient = config.apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; - } - return self; + return [self initWithApiClient:[SWGApiClient sharedClient]]; } -- (id) initWithApiClient:(SWGApiClient *)apiClient { + +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient { self = [super init]; if (self) { _apiClient = apiClient; @@ -42,15 +34,6 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; #pragma mark - -+ (instancetype)sharedAPI { - static SWGStoreApi *sharedAPI; - static dispatch_once_t once; - dispatch_once(&once, ^{ - sharedAPI = [[self alloc] init]; - }); - return sharedAPI; -} - -(NSString*) defaultHeaderForKey:(NSString*)key { return self.defaultHeaders[key]; } @@ -63,10 +46,6 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; [self.defaultHeaders setValue:value forKey:key]; } --(NSUInteger) requestQueueSize { - return [SWGApiClient requestQueueSize]; -} - #pragma mark - Api Methods /// @@ -76,7 +55,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) deleteOrderWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) deleteOrderWithOrderId: (NSString*) orderId completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'orderId' is set if (orderId == nil) { @@ -137,8 +116,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -146,7 +124,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// Returns a map of status codes to quantities /// @returns NSDictionary* /// --(NSNumber*) getInventoryWithCompletionHandler: +-(NSURLSessionTask*) getInventoryWithCompletionHandler: (void (^)(NSDictionary* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/inventory"]; @@ -193,8 +171,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; if(handler) { handler((NSDictionary*)data, error); } - } - ]; + }]; } /// @@ -204,7 +181,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// @returns SWGOrder* /// --(NSNumber*) getOrderByIdWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { // verify the required parameter 'orderId' is set if (orderId == nil) { @@ -265,8 +242,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; if(handler) { handler((SWGOrder*)data, error); } - } - ]; + }]; } /// @@ -276,7 +252,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// @returns SWGOrder* /// --(NSNumber*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"]; @@ -324,8 +300,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; if(handler) { handler((SWGOrder*)data, error); } - } - ]; + }]; } diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h index 67f8ec9cbb2..2c35bdcb7b0 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h @@ -32,7 +32,7 @@ extern NSString* kSWGUserApiErrorDomain; extern NSInteger kSWGUserApiMissingParamErrorCode; -+(instancetype) sharedAPI; +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient NS_DESIGNATED_INITIALIZER; /// Create user /// This can only be done by the logged in user. @@ -42,7 +42,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler; @@ -54,7 +54,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler; @@ -66,7 +66,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler; @@ -79,7 +79,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:404 message:"User not found" /// /// @return --(NSNumber*) deleteUserWithUsername: (NSString*) username +-(NSURLSessionTask*) deleteUserWithUsername: (NSString*) username completionHandler: (void (^)(NSError* error)) handler; @@ -93,7 +93,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:404 message:"User not found" /// /// @return SWGUser* --(NSNumber*) getUserByNameWithUsername: (NSString*) username +-(NSURLSessionTask*) getUserByNameWithUsername: (NSString*) username completionHandler: (void (^)(SWGUser* output, NSError* error)) handler; @@ -107,7 +107,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:400 message:"Invalid username/password supplied" /// /// @return NSString* --(NSNumber*) loginUserWithUsername: (NSString*) username +-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username password: (NSString*) password completionHandler: (void (^)(NSString* output, NSError* error)) handler; @@ -119,7 +119,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:0 message:"successful operation" /// /// @return --(NSNumber*) logoutUserWithCompletionHandler: +-(NSURLSessionTask*) logoutUserWithCompletionHandler: (void (^)(NSError* error)) handler; @@ -133,7 +133,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// code:404 message:"User not found" /// /// @return --(NSNumber*) updateUserWithUsername: (NSString*) username +-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username body: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m index 6ffb578ed76..58e1729f490 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m @@ -5,7 +5,7 @@ @interface SWGUserApi () -@property (nonatomic, strong) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; @end @@ -19,19 +19,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; #pragma mark - Initialize methods - (instancetype) init { - self = [super init]; - if (self) { - SWGConfiguration *config = [SWGConfiguration sharedConfig]; - if (config.apiClient == nil) { - config.apiClient = [[SWGApiClient alloc] init]; - } - _apiClient = config.apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; - } - return self; + return [self initWithApiClient:[SWGApiClient sharedClient]]; } -- (id) initWithApiClient:(SWGApiClient *)apiClient { + +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient { self = [super init]; if (self) { _apiClient = apiClient; @@ -42,15 +34,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; #pragma mark - -+ (instancetype)sharedAPI { - static SWGUserApi *sharedAPI; - static dispatch_once_t once; - dispatch_once(&once, ^{ - sharedAPI = [[self alloc] init]; - }); - return sharedAPI; -} - -(NSString*) defaultHeaderForKey:(NSString*)key { return self.defaultHeaders[key]; } @@ -63,10 +46,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; [self.defaultHeaders setValue:value forKey:key]; } --(NSUInteger) requestQueueSize { - return [SWGApiClient requestQueueSize]; -} - #pragma mark - Api Methods /// @@ -76,7 +55,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"]; @@ -124,8 +103,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -135,7 +113,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"]; @@ -183,8 +161,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -194,7 +171,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"]; @@ -242,8 +219,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -253,7 +229,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) deleteUserWithUsername: (NSString*) username +-(NSURLSessionTask*) deleteUserWithUsername: (NSString*) username completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'username' is set if (username == nil) { @@ -314,8 +290,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -325,7 +300,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns SWGUser* /// --(NSNumber*) getUserByNameWithUsername: (NSString*) username +-(NSURLSessionTask*) getUserByNameWithUsername: (NSString*) username completionHandler: (void (^)(SWGUser* output, NSError* error)) handler { // verify the required parameter 'username' is set if (username == nil) { @@ -386,8 +361,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler((SWGUser*)data, error); } - } - ]; + }]; } /// @@ -399,7 +373,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns NSString* /// --(NSNumber*) loginUserWithUsername: (NSString*) username +-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username password: (NSString*) password completionHandler: (void (^)(NSString* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/login"]; @@ -453,8 +427,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler((NSString*)data, error); } - } - ]; + }]; } /// @@ -462,7 +435,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) logoutUserWithCompletionHandler: +-(NSURLSessionTask*) logoutUserWithCompletionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/logout"]; @@ -509,8 +482,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } /// @@ -522,7 +494,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// @returns void /// --(NSNumber*) updateUserWithUsername: (NSString*) username +-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username body: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'username' is set @@ -585,8 +557,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; if(handler) { handler(error); } - } - ]; + }]; } diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.h b/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.h index dd8e721b3b9..ace66ba3146 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.h @@ -1,5 +1,4 @@ #import -#import #import /** diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.m b/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.m index cec8bdeea27..b544a1dae58 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.m @@ -1,3 +1,4 @@ +#import #import "JSONValueTransformer+ISO8601.h" @implementation JSONValueTransformer (ISO8601) diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h index 93b564be3d1..c02d289a336 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h @@ -28,15 +28,13 @@ @protocol SWGApi -@property(nonatomic, assign) SWGApiClient *apiClient; +@property(readonly, nonatomic, strong) SWGApiClient *apiClient; --(id) initWithApiClient:(SWGApiClient *)apiClient; +-(instancetype) initWithApiClient:(SWGApiClient *)apiClient; -(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:"); -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; -(NSString*) defaultHeaderForKey:(NSString*)key; --(NSUInteger) requestQueueSize; - @end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h index 2ec5c9b0fcc..4f7a6fda11a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h @@ -1,13 +1,7 @@ -#import -#import #import -#import "SWGJSONResponseSerializer.h" -#import "SWGJSONRequestSerializer.h" -#import "SWGQueryParamCollection.h" #import "SWGConfiguration.h" #import "SWGResponseDeserializer.h" #import "SWGSanitizer.h" -#import "SWGLogger.h" /** * Swagger Petstore @@ -33,16 +27,6 @@ * limitations under the License. */ -#import "SWGCategory.h" -#import "SWGOrder.h" -#import "SWGPet.h" -#import "SWGTag.h" -#import "SWGUser.h" - - - -@class SWGConfiguration; - /** * A key for `NSError` user info dictionaries. * @@ -50,15 +34,15 @@ */ extern NSString *const SWGResponseObjectErrorKey; + @interface SWGApiClient : AFHTTPSessionManager +@property (nonatomic, strong, readonly) id configuration; + @property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property(nonatomic, assign) NSTimeInterval timeoutInterval; @property(nonatomic, readonly) NSOperationQueue* queue; -/// In order to ensure the HTTPResponseHeaders are correct, it is recommended to initialize one SWGApiClient instance per thread. -@property(nonatomic, readonly) NSDictionary* HTTPResponseHeaders; - @property(nonatomic, strong) id responseDeserializer; @property(nonatomic, strong) id sanitizer; @@ -74,13 +58,6 @@ extern NSString *const SWGResponseObjectErrorKey; */ +(void)setCacheEnabled:(BOOL) enabled; -/** - * Gets the request queue size - * - * @return The size of `queuedRequests` static variable. - */ -+(NSUInteger)requestQueueSize; - /** * Sets the client unreachable * @@ -109,27 +86,6 @@ extern NSString *const SWGResponseObjectErrorKey; */ +(AFNetworkReachabilityStatus) getReachabilityStatus; -/** - * Gets the next request id - * - * @return The next executed request id. - */ -+(NSNumber*) nextRequestId; - -/** - * Generates request id and add it to the queue - * - * @return The next executed request id. - */ -+(NSNumber*) queueRequest; - -/** - * Removes request id from the queue - * - * @param requestId The request which will be removed. - */ -+(void) cancelRequest:(NSNumber*)requestId; - /** * Customizes the behavior when the reachability changed * @@ -137,6 +93,11 @@ extern NSString *const SWGResponseObjectErrorKey; */ +(void) setReachabilityChangeBlock:(void(^)(int))changeBlock; +/** + * Gets client singleton instance + */ ++ (instancetype) sharedClient; + /** * Sets the api client reachability strategy */ @@ -162,6 +123,14 @@ extern NSString *const SWGResponseObjectErrorKey; queryParams:(NSDictionary **)querys WithAuthSettings:(NSArray *)authSettings; + +/** + * Initializes the session manager with a configuration. + * + * @param configuration The configuration implementation + */ +- (instancetype)initWithConfiguration:(id)configuration; + /** * Performs request * @@ -176,21 +145,21 @@ extern NSString *const SWGResponseObjectErrorKey; * @param responseContentType Response content-type. * @param completionBlock The block will be executed when the request completed. * - * @return The request id. + * @return The created session task. */ --(NSNumber*) requestWithPath:(NSString*) path - method:(NSString*) method - pathParams:(NSDictionary *) pathParams - queryParams:(NSDictionary*) queryParams - formParams:(NSDictionary *) formParams - files:(NSDictionary *) files - body:(id) body - headerParams:(NSDictionary*) headerParams - authSettings:(NSArray *) authSettings - requestContentType:(NSString*) requestContentType - responseContentType:(NSString*) responseContentType - responseType:(NSString *) responseType - completionBlock:(void (^)(id, NSError *))completionBlock; +- (NSURLSessionTask*) requestWithPath: (NSString*) path + method: (NSString*) method + pathParams: (NSDictionary *) pathParams + queryParams: (NSDictionary*) queryParams + formParams: (NSDictionary *) formParams + files: (NSDictionary *) files + body: (id) body + headerParams: (NSDictionary*) headerParams + authSettings: (NSArray *) authSettings + requestContentType: (NSString*) requestContentType + responseContentType: (NSString*) responseContentType + responseType: (NSString *) responseType + completionBlock: (void (^)(id, NSError *))completionBlock; /** * Custom security policy @@ -199,12 +168,4 @@ extern NSString *const SWGResponseObjectErrorKey; */ - (AFSecurityPolicy *) customSecurityPolicy; -/** - * SWGConfiguration return sharedConfig - * - * @return SWGConfiguration - */ -- (SWGConfiguration*) configuration; - - @end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m index f004200b2eb..d4758d36b03 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m @@ -1,10 +1,16 @@ +#import + #import "SWGApiClient.h" +#import "SWGJSONRequestSerializer.h" +#import "SWGJSONResponseSerializer.h" +#import "SWGQueryParamCollection.h" +#import "SWGDefaultConfiguration.h" + + NSString *const SWGResponseObjectErrorKey = @"SWGResponseObject"; -static NSUInteger requestId = 0; static bool offlineState = false; -static NSMutableSet * queuedRequests = nil; static bool cacheEnabled = false; static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable; static void (^reachabilityChangeBlock)(int); @@ -36,38 +42,61 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { @interface SWGApiClient () -@property (nonatomic, strong) NSDictionary* HTTPResponseHeaders; +@property (nonatomic, strong, readwrite) id configuration; @end @implementation SWGApiClient +#pragma mark - Singleton Methods + ++ (instancetype) sharedClient { + static SWGApiClient *sharedClient = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedClient = [[self alloc] init]; + }); + return sharedClient; +} + +#pragma mark - Initialize Methods + - (instancetype)init { - NSString *baseUrl = [[SWGConfiguration sharedConfig] host]; - return [self initWithBaseURL:[NSURL URLWithString:baseUrl]]; + + return [self initWithConfiguration:[SWGDefaultConfiguration sharedConfig]]; } - (instancetype)initWithBaseURL:(NSURL *)url { + + return [self initWithBaseURL:url + configuration:[SWGDefaultConfiguration sharedConfig]]; + +} + +- (instancetype)initWithConfiguration:(id)configuration { + + return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url + configuration:(id)configuration { + self = [super initWithBaseURL:url]; if (self) { - self.timeoutInterval = 60; + _configuration = configuration; + _timeoutInterval = 60; + _responseDeserializer = [[SWGResponseDeserializer alloc] init]; + _sanitizer = [[SWGSanitizer alloc] init]; + self.requestSerializer = [AFJSONRequestSerializer serializer]; self.responseSerializer = [AFJSONResponseSerializer serializer]; self.securityPolicy = [self customSecurityPolicy]; - self.responseDeserializer = [[SWGResponseDeserializer alloc] init]; - self.sanitizer = [[SWGSanitizer alloc] init]; + // configure reachability [self configureCacheReachibility]; } - return self; -} -+ (void)initialize { - if (self == [SWGApiClient class]) { - queuedRequests = [[NSMutableSet alloc] init]; - // initialize URL cache - [self configureCacheWithMemoryAndDiskCapacity:4*1024*1024 diskSize:32*1024*1024]; - } + return self; } #pragma mark - Setter Methods @@ -113,43 +142,6 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [NSURLCache setSharedURLCache:cache]; } -#pragma mark - Request Methods - -+(NSUInteger)requestQueueSize { - return [queuedRequests count]; -} - -+(NSNumber*) nextRequestId { - @synchronized(self) { - return @(++requestId); - } -} - -+(NSNumber*) queueRequest { - NSNumber* requestId = [[self class] nextRequestId]; - SWGDebugLog(@"added %@ to request queue", requestId); - [queuedRequests addObject:requestId]; - return requestId; -} - -+(void) cancelRequest:(NSNumber*)requestId { - [queuedRequests removeObject:requestId]; -} - --(Boolean) executeRequestWithId:(NSNumber*) requestId { - NSSet* matchingItems = [queuedRequests objectsPassingTest:^BOOL(id obj, BOOL *stop) { - return [obj intValue] == [requestId intValue]; - }]; - - if (matchingItems.count == 1) { - SWGDebugLog(@"removed request id %@", requestId); - [queuedRequests removeObject:requestId]; - return YES; - } else { - return NO; - } -} - #pragma mark - Reachability Methods +(AFNetworkReachabilityStatus) getReachabilityStatus { @@ -179,23 +171,19 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [self.reachabilityManager startMonitoring]; } -#pragma mark - Operation Methods +#pragma mark - Task Methods -- (void) operationWithCompletionBlock: (NSURLRequest *)request - requestId: (NSNumber *) requestId - completionBlock: (void (^)(id, NSError *))completionBlock { - __weak __typeof(self)weakSelf = self; - NSURLSessionDataTask* op = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if (![strongSelf executeRequestWithId:requestId]) { - return; - } +- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request + completionBlock: (void (^)(id, NSError *))completionBlock { + + NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { SWGDebugLogResponse(response, responseObject,request,error); - strongSelf.HTTPResponseHeaders = SWG__headerFieldsForResponse(response); + if(!error) { completionBlock(responseObject, nil); return; } + NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { // Add in the (parsed) response body. @@ -204,20 +192,18 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); }]; - [op resume]; + + return task; } -- (void) downloadOperationWithCompletionBlock: (NSURLRequest *)request - requestId: (NSNumber *) requestId - completionBlock: (void (^)(id, NSError *))completionBlock { - __weak __typeof(self)weakSelf = self; - NSURLSessionDataTask* op = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if (![strongSelf executeRequestWithId:requestId]) { - return; - } - strongSelf.HTTPResponseHeaders = SWG__headerFieldsForResponse(response); +- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request + completionBlock: (void (^)(id, NSError *))completionBlock { + + id config = self.configuration; + + NSURLSessionDataTask* task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { SWGDebugLogResponse(response, responseObject,request,error); + if(error) { NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { @@ -226,8 +212,9 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); } - NSString *directory = [self configuration].tempFolderPath ?: NSTemporaryDirectory(); - NSString * filename = SWG__fileNameForResponse(response); + + NSString *directory = config.tempFolderPath ?: NSTemporaryDirectory(); + NSString *filename = SWG__fileNameForResponse(response); NSString *filepath = [directory stringByAppendingPathComponent:filename]; NSURL *file = [NSURL fileURLWithPath:filepath]; @@ -236,24 +223,26 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { completionBlock(file, nil); }]; - [op resume]; + + return task; } -#pragma mark - Perform Request Methods +#pragma mark - Perform Request Methods + +- (NSURLSessionTask*) requestWithPath: (NSString*) path + method: (NSString*) method + pathParams: (NSDictionary *) pathParams + queryParams: (NSDictionary*) queryParams + formParams: (NSDictionary *) formParams + files: (NSDictionary *) files + body: (id) body + headerParams: (NSDictionary*) headerParams + authSettings: (NSArray *) authSettings + requestContentType: (NSString*) requestContentType + responseContentType: (NSString*) responseContentType + responseType: (NSString *) responseType + completionBlock: (void (^)(id, NSError *))completionBlock { --(NSNumber*) requestWithPath: (NSString*) path - method: (NSString*) method - pathParams: (NSDictionary *) pathParams - queryParams: (NSDictionary*) queryParams - formParams: (NSDictionary *) formParams - files: (NSDictionary *) files - body: (id) body - headerParams: (NSDictionary*) headerParams - authSettings: (NSArray *) authSettings - requestContentType: (NSString*) requestContentType - responseContentType: (NSString*) responseContentType - responseType: (NSString *) responseType - completionBlock: (void (^)(id, NSError *))completionBlock { // setting request serializer if ([requestContentType isEqualToString:@"application/json"]) { self.requestSerializer = [SWGJSONRequestSerializer serializer]; @@ -359,14 +348,16 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [self postProcessRequest:request]; - NSNumber* requestId = [SWGApiClient queueRequest]; + + NSURLSessionTask *task = nil; + if ([responseType isEqualToString:@"NSURL*"] || [responseType isEqualToString:@"NSURL"]) { - [self downloadOperationWithCompletionBlock:request requestId:requestId completionBlock:^(id data, NSError *error) { + task = [self downloadTaskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { completionBlock(data, error); }]; } else { - [self operationWithCompletionBlock:request requestId:requestId completionBlock:^(id data, NSError *error) { + task = [self taskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { NSError * serializationError; id response = [self.responseDeserializer deserialize:data class:responseType error:&serializationError]; if(!response && !error){ @@ -375,7 +366,10 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { completionBlock(response, error); }]; } - return requestId; + + [task resume]; + + return task; } //Added for easier override to modify request @@ -455,10 +449,11 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSMutableDictionary *headersWithAuth = [NSMutableDictionary dictionaryWithDictionary:*headers]; NSMutableDictionary *querysWithAuth = [NSMutableDictionary dictionaryWithDictionary:*querys]; - - NSDictionary* configurationAuthSettings = [[self configuration] authSettings]; + + id config = self.configuration; for (NSString *auth in authSettings) { - NSDictionary *authSetting = configurationAuthSettings[auth]; + NSDictionary *authSetting = config.authSettings[auth]; + if(!authSetting) { // auth setting is set only if the key is non-empty continue; } @@ -479,11 +474,11 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { - (AFSecurityPolicy *) customSecurityPolicy { AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; - SWGConfiguration *config = [self configuration]; + id config = self.configuration; if (config.sslCaCert) { NSData *certData = [NSData dataWithContentsOfFile:config.sslCaCert]; - [securityPolicy setPinnedCertificates:@[certData]]; + [securityPolicy setPinnedCertificates:[NSSet setWithObject:certData]]; } if (config.verifySSL) { @@ -497,8 +492,4 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { return securityPolicy; } -- (SWGConfiguration*) configuration { - return [SWGConfiguration sharedConfig]; -} - @end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGBasicAuthTokenProvider.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGBasicAuthTokenProvider.h new file mode 100644 index 00000000000..6c50d3750b4 --- /dev/null +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGBasicAuthTokenProvider.h @@ -0,0 +1,14 @@ +/** The `SWGBasicAuthTokenProvider` class creates a basic auth token from username and password. + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +#import + +@interface SWGBasicAuthTokenProvider : NSObject + ++ (NSString *)createBasicAuthTokenWithUsername:(NSString *)username password:(NSString *)password; + +@end \ No newline at end of file diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGBasicAuthTokenProvider.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGBasicAuthTokenProvider.m new file mode 100644 index 00000000000..3788009ec58 --- /dev/null +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGBasicAuthTokenProvider.m @@ -0,0 +1,19 @@ +#import "SWGBasicAuthTokenProvider.h" + +@implementation SWGBasicAuthTokenProvider + ++ (NSString *)createBasicAuthTokenWithUsername:(NSString *)username password:(NSString *)password { + + // return empty string if username and password are empty + if (username.length == 0 && password.length == 0){ + return @""; + } + + NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password]; + NSData *data = [basicAuthCredentials dataUsingEncoding:NSUTF8StringEncoding]; + basicAuthCredentials = [NSString stringWithFormat:@"Basic %@", [data base64EncodedStringWithOptions:0]]; + + return basicAuthCredentials; +} + +@end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h index b6c37405ca2..a85a47d4bc8 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h @@ -1,5 +1,4 @@ #import -#import "SWGApiClient.h" #import "SWGLogger.h" /** @@ -26,157 +25,73 @@ * limitations under the License. */ -@class SWGApiClient; - -@interface SWGConfiguration : NSObject +@protocol SWGConfiguration /** - * Default api logger + * Api logger */ -@property (nonatomic, strong) SWGLogger * logger; +@property (readonly, nonatomic) SWGLogger *logger; /** - * Default api client + * Base url */ -@property (nonatomic) SWGApiClient *apiClient; - -/** - * Default base url - */ -@property (nonatomic) NSString *host; +@property (readonly, nonatomic) NSString *host; /** * Api key values for Api Key type Authentication - * - * To add or remove api key, use `setApiKey:forApiKeyIdentifier:`. */ -@property (readonly, nonatomic, strong) NSDictionary *apiKey; +@property (readonly, nonatomic) NSDictionary *apiKey; /** * Api key prefix values to be prepend to the respective api key - * - * To add or remove prefix, use `setApiKeyPrefix:forApiKeyPrefixIdentifier:`. */ -@property (readonly, nonatomic, strong) NSDictionary *apiKeyPrefix; +@property (readonly, nonatomic) NSDictionary *apiKeyPrefix; /** * Username for HTTP Basic Authentication */ - @property (nonatomic) NSString *username; +@property (readonly, nonatomic) NSString *username; /** * Password for HTTP Basic Authentication */ -@property (nonatomic) NSString *password; +@property (readonly, nonatomic) NSString *password; /** * Access token for OAuth */ -@property (nonatomic) NSString *accessToken; +@property (readonly, nonatomic) NSString *accessToken; /** * Temp folder for file download */ -@property (nonatomic) NSString *tempFolderPath; +@property (readonly, nonatomic) NSString *tempFolderPath; /** * Debug switch, default false */ -@property (nonatomic) BOOL debug; - -/** - * Gets configuration singleton instance - */ -+ (instancetype) sharedConfig; +@property (readonly, nonatomic) BOOL debug; /** * SSL/TLS verification * Set this to NO to skip verifying SSL certificate when calling API from https server */ -@property (nonatomic) BOOL verifySSL; +@property (readonly, nonatomic) BOOL verifySSL; /** * SSL/TLS verification * Set this to customize the certificate file to verify the peer */ -@property (nonatomic) NSString *sslCaCert; +@property (readonly, nonatomic) NSString *sslCaCert; /** - * Sets API key - * - * To remove a apiKey for an identifier, just set the apiKey to nil. - * - * @param apiKey API key or token. - * @param identifier API key identifier (authentication schema). - * + * Authentication Settings */ -- (void) setApiKey:(NSString *)apiKey forApiKeyIdentifier:(NSString*)identifier; - -/** - * Removes api key - * - * @param identifier API key identifier. - */ -- (void) removeApiKey:(NSString *)identifier; - -/** - * Sets the prefix for API key - * - * @param apiKeyPrefix API key prefix. - * @param identifier API key identifier. - */ -- (void) setApiKeyPrefix:(NSString *)prefix forApiKeyPrefixIdentifier:(NSString *)identifier; - -/** - * Removes api key prefix - * - * @param identifier API key identifier. - */ -- (void) removeApiKeyPrefix:(NSString *)identifier; - -/** - * Gets API key (with prefix if set) - */ -- (NSString *) getApiKeyWithPrefix:(NSString *) key; - -/** - * Gets Basic Auth token - */ -- (NSString *) getBasicAuthToken; - -/** - * Gets OAuth access token - */ -- (NSString *) getAccessToken; - -/** - * Gets Authentication Settings - */ -- (NSDictionary *) authSettings; +@property (readonly, nonatomic) NSDictionary *authSettings; /** * Default headers for all services */ @property (readonly, nonatomic, strong) NSDictionary *defaultHeaders; -/** -* Removes header from defaultHeaders -* -* @param Header name. -*/ --(void) removeDefaultHeaderForKey:(NSString*)key; - -/** -* Sets the header for key -* -* @param value Value for header name -* @param key Header name -*/ --(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; - -/** -* @param Header key name. -*/ --(NSString*) defaultHeaderForKey:(NSString*)key; - -@end +@end \ No newline at end of file diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h new file mode 100644 index 00000000000..cd44d30e551 --- /dev/null +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -0,0 +1,175 @@ +#import +#import "SWGConfiguration.h" + +/** +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +@interface SWGDefaultConfiguration : NSObject + + +/** + * Default api logger + */ +@property (nonatomic, strong) SWGLogger * logger; + +/** + * Default base url + */ +@property (nonatomic) NSString *host; + +/** + * Api key values for Api Key type Authentication + * + * To add or remove api key, use `setApiKey:forApiKeyIdentifier:`. + */ +@property (readonly, nonatomic, strong) NSDictionary *apiKey; + +/** + * Api key prefix values to be prepend to the respective api key + * + * To add or remove prefix, use `setApiKeyPrefix:forApiKeyPrefixIdentifier:`. + */ +@property (readonly, nonatomic, strong) NSDictionary *apiKeyPrefix; + +/** + * Username for HTTP Basic Authentication + */ + @property (nonatomic) NSString *username; + +/** + * Password for HTTP Basic Authentication + */ +@property (nonatomic) NSString *password; + +/** + * Access token for OAuth + */ +@property (nonatomic) NSString *accessToken; + +/** + * Temp folder for file download + */ +@property (nonatomic) NSString *tempFolderPath; + +/** + * Debug switch, default false + */ +@property (nonatomic) BOOL debug; + +/** + * Gets configuration singleton instance + */ ++ (instancetype) sharedConfig; + +/** + * SSL/TLS verification + * Set this to NO to skip verifying SSL certificate when calling API from https server + */ +@property (nonatomic) BOOL verifySSL; + +/** + * SSL/TLS verification + * Set this to customize the certificate file to verify the peer + */ +@property (nonatomic) NSString *sslCaCert; + +/** + * Sets API key + * + * To remove a apiKey for an identifier, just set the apiKey to nil. + * + * @param apiKey API key or token. + * @param identifier API key identifier (authentication schema). + * + */ +- (void) setApiKey:(NSString *)apiKey forApiKeyIdentifier:(NSString*)identifier; + +/** + * Removes api key + * + * @param identifier API key identifier. + */ +- (void) removeApiKey:(NSString *)identifier; + +/** + * Sets the prefix for API key + * + * @param apiKeyPrefix API key prefix. + * @param identifier API key identifier. + */ +- (void) setApiKeyPrefix:(NSString *)prefix forApiKeyPrefixIdentifier:(NSString *)identifier; + +/** + * Removes api key prefix + * + * @param identifier API key identifier. + */ +- (void) removeApiKeyPrefix:(NSString *)identifier; + +/** + * Gets API key (with prefix if set) + */ +- (NSString *) getApiKeyWithPrefix:(NSString *) key; + +/** + * Gets Basic Auth token + */ +- (NSString *) getBasicAuthToken; + +/** + * Gets OAuth access token + */ +- (NSString *) getAccessToken; + +/** + * Gets Authentication Settings + */ +- (NSDictionary *) authSettings; + +/** +* Default headers for all services +*/ +@property (readonly, nonatomic, strong) NSDictionary *defaultHeaders; + +/** +* Removes header from defaultHeaders +* +* @param Header name. +*/ +-(void) removeDefaultHeaderForKey:(NSString*)key; + +/** +* Sets the header for key +* +* @param value Value for header name +* @param key Header name +*/ +-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; + +/** +* @param Header key name. +*/ +-(NSString*) defaultHeaderForKey:(NSString*)key; + +@end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m similarity index 72% rename from samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.m rename to samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m index b21290068a1..cd37ae35859 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m @@ -1,6 +1,7 @@ -#import "SWGConfiguration.h" +#import "SWGDefaultConfiguration.h" +#import "SWGBasicAuthTokenProvider.h" -@interface SWGConfiguration () +@interface SWGDefaultConfiguration () @property (nonatomic, strong) NSMutableDictionary *mutableDefaultHeaders; @property (nonatomic, strong) NSMutableDictionary *mutableApiKey; @@ -8,12 +9,12 @@ @end -@implementation SWGConfiguration +@implementation SWGDefaultConfiguration #pragma mark - Singleton Methods + (instancetype) sharedConfig { - static SWGConfiguration *shardConfig = nil; + static SWGDefaultConfiguration *shardConfig = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ shardConfig = [[self alloc] init]; @@ -26,17 +27,16 @@ - (instancetype) init { self = [super init]; if (self) { - self.apiClient = nil; - self.host = @"http://petstore.swagger.io/v2"; - self.username = @""; - self.password = @""; - self.accessToken= @""; - self.verifySSL = YES; - self.mutableApiKey = [NSMutableDictionary dictionary]; - self.mutableApiKeyPrefix = [NSMutableDictionary dictionary]; - self.mutableDefaultHeaders = [NSMutableDictionary dictionary]; - self.mutableDefaultHeaders[@"User-Agent"] = [NSString stringWithFormat:@"Swagger-Codegen/1.0.0/objc (%@; iOS %@; Scale/%0.2f)",[[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; - self.logger = [SWGLogger sharedLogger]; + _host = @"http://petstore.swagger.io/v2"; + _username = @""; + _password = @""; + _accessToken= @""; + _verifySSL = YES; + _mutableApiKey = [NSMutableDictionary dictionary]; + _mutableApiKeyPrefix = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; + ; + _logger = [SWGLogger sharedLogger]; } return self; } @@ -58,16 +58,9 @@ } - (NSString *) getBasicAuthToken { - // return empty string if username and password are empty - if (self.username.length == 0 && self.password.length == 0){ - return @""; - } - NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", self.username, self.password]; - NSData *data = [basicAuthCredentials dataUsingEncoding:NSUTF8StringEncoding]; - basicAuthCredentials = [NSString stringWithFormat:@"Basic %@", [data base64EncodedStringWithOptions:0]]; - - return basicAuthCredentials; + NSString *basicAuthToken = [SWGBasicAuthTokenProvider createBasicAuthTokenWithUsername:self.username password:self.password]; + return basicAuthToken; } - (NSString *) getAccessToken { @@ -110,13 +103,6 @@ - (NSDictionary *) authSettings { return @{ - @"api_key": - @{ - @"type": @"api_key", - @"in": @"header", - @"key": @"api_key", - @"value": [self getApiKeyWithPrefix:@"api_key"] - }, @"petstore_auth": @{ @"type": @"oauth", @@ -124,6 +110,13 @@ @"key": @"Authorization", @"value": [self getAccessToken] }, + @"api_key": + @{ + @"type": @"api_key", + @"in": @"header", + @"key": @"api_key", + @"value": [self getApiKeyWithPrefix:@"api_key"] + }, }; } diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.m index 8085c404f7e..db970d34669 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.m @@ -2,6 +2,35 @@ @implementation SWGObject +/** + * Workaround for JSONModel multithreading issues + * https://github.com/icanzilb/JSONModel/issues/441 + */ +- (instancetype)initWithDictionary:(NSDictionary *)dict error:(NSError **)err { + static NSMutableSet *classNames; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + classNames = [NSMutableSet new]; + }); + + BOOL initSync; + @synchronized([self class]) + { + NSString *className = NSStringFromClass([self class]); + initSync = ![classNames containsObject:className]; + if(initSync) + { + [classNames addObject:className]; + self = [super initWithDictionary:dict error:err]; + } + } + if(!initSync) + { + self = [super initWithDictionary:dict error:err]; + } + return self; +} + /** * Gets the string presentation of the object. * This method will be called when logging model object using `NSLog`. diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.m index 83303045185..9aa8a091762 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.m @@ -5,11 +5,15 @@ @synthesize values = _values; @synthesize format = _format; -- (id) initWithValuesAndFormat: (NSArray*) values - format: (NSString*) format { - _values = values; - _format = format; +- (id)initWithValuesAndFormat:(NSArray *)values + format:(NSString *)format { + self = [super init]; + if (self) { + _values = values; + _format = format; + } + return self; } diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj index 25e7b5a2d2c..d2cacf84e6e 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -1,645 +1,1570 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */; }; - 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; - 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; - 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; - 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; - 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; - 6003F59E195388D20070C39A /* SWGAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* SWGAppDelegate.m */; }; - 6003F5A7195388D20070C39A /* SWGViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* SWGViewController.m */; }; - 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; - 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; - 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; - 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; - 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; - 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */; }; - B2ADC0B1C8A60A05C48B4DF7 /* DatabaseHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */; }; - B2ADC17C287DCABF329BA8AC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC7027D4B025ABCA7999F /* Main.storyboard */; }; - B2ADC2D632658A5F73C6CE66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC65E342ADA697322D68C /* Images.xcassets */; }; - B2ADC56977372855A63F4E4D /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */; }; - CF0ADB481B5F95D6008A2729 /* PetTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF0ADB471B5F95D6008A2729 /* PetTest.m */; }; - CF8F71391B5F73AC00162980 /* DeserializationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF8F71381B5F73AC00162980 /* DeserializationTest.m */; }; - CFDFB4121B3CFFA8009739C5 /* UserApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */; }; - CFDFB4131B3CFFDD009739C5 /* PetApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */; }; - CFDFB4141B3CFFF6009739C5 /* StoreApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */; }; - CFDFB4151B3D000B009739C5 /* SWGApiClientTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40C1B3CFEC3009739C5 /* SWGApiClientTest.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6003F582195388D10070C39A /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6003F589195388D20070C39A; - remoteInfo = SwaggerClient; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig"; sourceTree = ""; }; - 4CCE21315897B7D544C83242 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - 6003F58A195388D20070C39A /* SwaggerClient_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 6003F595195388D20070C39A /* SwaggerClient-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SwaggerClient-Info.plist"; sourceTree = ""; }; - 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6003F59B195388D20070C39A /* SwaggerClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwaggerClient-Prefix.pch"; sourceTree = ""; }; - 6003F59C195388D20070C39A /* SWGAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWGAppDelegate.h; sourceTree = ""; }; - 6003F59D195388D20070C39A /* SWGAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SWGAppDelegate.m; sourceTree = ""; }; - 6003F5A5195388D20070C39A /* SWGViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWGViewController.h; sourceTree = ""; }; - 6003F5A6195388D20070C39A /* SWGViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SWGViewController.m; sourceTree = ""; }; - 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClient_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; - 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; - 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; - 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig"; sourceTree = ""; }; - 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "SwaggerClient/Launch Screen.storyboard"; sourceTree = ""; }; - B2ADC2F3483B3117A00FA91C /* DatabaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseHelper.h; sourceTree = ""; }; - B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatabaseHelper.m; sourceTree = ""; }; - B2ADC65E342ADA697322D68C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SwaggerClient/Images.xcassets; sourceTree = ""; }; - B2ADC7027D4B025ABCA7999F /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Main.storyboard; path = SwaggerClient/Main.storyboard; sourceTree = ""; }; - BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig"; sourceTree = ""; }; - CF0ADB471B5F95D6008A2729 /* PetTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PetTest.m; sourceTree = ""; }; - CF8F71381B5F73AC00162980 /* DeserializationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeserializationTest.m; sourceTree = ""; }; - CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PetApiTest.m; sourceTree = ""; }; - CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StoreApiTest.m; sourceTree = ""; }; - CFDFB40C1B3CFEC3009739C5 /* SWGApiClientTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGApiClientTest.m; sourceTree = ""; }; - CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserApiTest.m; sourceTree = ""; }; - E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig"; sourceTree = ""; }; - E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwaggerClient.podspec; path = ../SwaggerClient.podspec; sourceTree = ""; }; - FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 6003F587195388D20070C39A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, - 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, - 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AB195388D20070C39A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, - 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, - 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, - 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 6003F581195388D10070C39A = { - isa = PBXGroup; - children = ( - 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, - 6003F593195388D20070C39A /* Example for SwaggerClient */, - 6003F5B5195388D20070C39A /* Tests */, - 6003F58C195388D20070C39A /* Frameworks */, - 6003F58B195388D20070C39A /* Products */, - CCE77F10C6D41F74B075ECD0 /* Pods */, - ); - sourceTree = ""; - }; - 6003F58B195388D20070C39A /* Products */ = { - isa = PBXGroup; - children = ( - 6003F58A195388D20070C39A /* SwaggerClient_Example.app */, - 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */, - B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */, - ); - name = Products; - sourceTree = ""; - }; - 6003F58C195388D20070C39A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6003F58D195388D20070C39A /* Foundation.framework */, - 6003F58F195388D20070C39A /* CoreGraphics.framework */, - 6003F591195388D20070C39A /* UIKit.framework */, - 6003F5AF195388D20070C39A /* XCTest.framework */, - 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */, - FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6003F593195388D20070C39A /* Example for SwaggerClient */ = { - isa = PBXGroup; - children = ( - 6003F59C195388D20070C39A /* SWGAppDelegate.h */, - 6003F59D195388D20070C39A /* SWGAppDelegate.m */, - 6003F5A5195388D20070C39A /* SWGViewController.h */, - 6003F5A6195388D20070C39A /* SWGViewController.m */, - 6003F594195388D20070C39A /* Supporting Files */, - ); - name = "Example for SwaggerClient"; - path = SwaggerClient; - sourceTree = ""; - }; - 6003F594195388D20070C39A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 6003F595195388D20070C39A /* SwaggerClient-Info.plist */, - 6003F596195388D20070C39A /* InfoPlist.strings */, - 6003F599195388D20070C39A /* main.m */, - 6003F59B195388D20070C39A /* SwaggerClient-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 6003F5B5195388D20070C39A /* Tests */ = { - isa = PBXGroup; - children = ( - CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */, - CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */, - CFDFB40C1B3CFEC3009739C5 /* SWGApiClientTest.m */, - CF0ADB471B5F95D6008A2729 /* PetTest.m */, - CF8F71381B5F73AC00162980 /* DeserializationTest.m */, - CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */, - 6003F5BB195388D20070C39A /* Tests.m */, - 6003F5B6195388D20070C39A /* Supporting Files */, - B2ADCA62DE4AC0F5BAB42208 /* Helpers */, - ); - path = Tests; - sourceTree = ""; - }; - 6003F5B6195388D20070C39A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 6003F5B7195388D20070C39A /* Tests-Info.plist */, - 6003F5B8195388D20070C39A /* InfoPlist.strings */, - 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { - isa = PBXGroup; - children = ( - E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */, - 4CCE21315897B7D544C83242 /* README.md */, - B2ADC7027D4B025ABCA7999F /* Main.storyboard */, - B2ADC65E342ADA697322D68C /* Images.xcassets */, - ); - name = "Podspec Metadata"; - sourceTree = ""; - }; - B2ADCA62DE4AC0F5BAB42208 /* Helpers */ = { - isa = PBXGroup; - children = ( - B2ADC2F3483B3117A00FA91C /* DatabaseHelper.h */, - B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */, - ); - path = Helpers; - sourceTree = ""; - }; - CCE77F10C6D41F74B075ECD0 /* Pods */ = { - isa = PBXGroup; - children = ( - E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */, - BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */, - 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */, - 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 6003F589195388D20070C39A /* SwaggerClient_Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */; - buildPhases = ( - 799E7E29D924C30424DFBA28 /* 📦 Check Pods Manifest.lock */, - 6003F586195388D20070C39A /* Sources */, - 6003F587195388D20070C39A /* Frameworks */, - 6003F588195388D20070C39A /* Resources */, - 429AF5C69E165ED75311B4B0 /* 📦 Copy Pods Resources */, - 183E54C09C54DAEB54B2546F /* 📦 Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SwaggerClient_Example; - productName = SwaggerClient; - productReference = 6003F58A195388D20070C39A /* SwaggerClient_Example.app */; - productType = "com.apple.product-type.application"; - }; - 6003F5AD195388D20070C39A /* SwaggerClient_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */; - buildPhases = ( - 7B069562A9F91E498732474F /* 📦 Check Pods Manifest.lock */, - 6003F5AA195388D20070C39A /* Sources */, - 6003F5AB195388D20070C39A /* Frameworks */, - 6003F5AC195388D20070C39A /* Resources */, - E337D7E459CCFFDF27046FFC /* 📦 Copy Pods Resources */, - 111D7956304BD6E860AA8709 /* 📦 Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6003F5B4195388D20070C39A /* PBXTargetDependency */, - ); - name = SwaggerClient_Tests; - productName = SwaggerClientTests; - productReference = 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 6003F582195388D10070C39A /* Project object */ = { - isa = PBXProject; - attributes = { - CLASSPREFIX = SWG; - LastUpgradeCheck = 0510; - ORGANIZATIONNAME = geekerzp; - }; - buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 6003F581195388D10070C39A; - productRefGroup = 6003F58B195388D20070C39A /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 6003F589195388D20070C39A /* SwaggerClient_Example */, - 6003F5AD195388D20070C39A /* SwaggerClient_Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 6003F588195388D20070C39A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, - B2ADC17C287DCABF329BA8AC /* Main.storyboard in Resources */, - B2ADC2D632658A5F73C6CE66 /* Images.xcassets in Resources */, - B2ADC56977372855A63F4E4D /* Launch Screen.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AC195388D20070C39A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 111D7956304BD6E860AA8709 /* 📦 Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 183E54C09C54DAEB54B2546F /* 📦 Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 429AF5C69E165ED75311B4B0 /* 📦 Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 799E7E29D924C30424DFBA28 /* 📦 Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 7B069562A9F91E498732474F /* 📦 Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - E337D7E459CCFFDF27046FFC /* 📦 Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 6003F586195388D20070C39A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F59E195388D20070C39A /* SWGAppDelegate.m in Sources */, - 6003F5A7195388D20070C39A /* SWGViewController.m in Sources */, - 6003F59A195388D20070C39A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AA195388D20070C39A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CFDFB4141B3CFFF6009739C5 /* StoreApiTest.m in Sources */, - CF0ADB481B5F95D6008A2729 /* PetTest.m in Sources */, - CFDFB4131B3CFFDD009739C5 /* PetApiTest.m in Sources */, - 6003F5BC195388D20070C39A /* Tests.m in Sources */, - CFDFB4151B3D000B009739C5 /* SWGApiClientTest.m in Sources */, - CFDFB4121B3CFFA8009739C5 /* UserApiTest.m in Sources */, - CF8F71391B5F73AC00162980 /* DeserializationTest.m in Sources */, - B2ADC0B1C8A60A05C48B4DF7 /* DatabaseHelper.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 6003F589195388D20070C39A /* SwaggerClient_Example */; - targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 6003F596195388D20070C39A /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 6003F597195388D20070C39A /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 6003F5B9195388D20070C39A /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 6003F5BD195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - 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 = 7.1; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 6003F5BE195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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 = 7.1; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 6003F5C0195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SwaggerClient/SwaggerClient-Prefix.pch"; - INFOPLIST_FILE = "SwaggerClient/SwaggerClient-Info.plist"; - MODULE_NAME = ExampleApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 6003F5C1195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SwaggerClient/SwaggerClient-Prefix.pch"; - INFOPLIST_FILE = "SwaggerClient/SwaggerClient-Info.plist"; - MODULE_NAME = ExampleApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - 6003F5C3195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "Tests/Tests-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = xctest; - }; - name = Debug; - }; - 6003F5C4195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; - INFOPLIST_FILE = "Tests/Tests-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = xctest; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5BD195388D20070C39A /* Debug */, - 6003F5BE195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5C0195388D20070C39A /* Debug */, - 6003F5C1195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5C3195388D20070C39A /* Debug */, - 6003F5C4195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 6003F582195388D10070C39A /* Project object */; -} + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 111D7956304BD6E860AA8709 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh" + + showEnvVarsInLog + 0 + + 158CE3AA214CB1B31C7ADC48 + + fileRef + FDEF5BA3CF9CFFDEB5A47DB4 + isa + PBXBuildFile + + 183E54C09C54DAEB54B2546F + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh" + + showEnvVarsInLog + 0 + + 1A81C3BE3E54961CD827EAE3 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SwaggerClient_Tests.release.xcconfig + path + Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig + sourceTree + <group> + + 429AF5C69E165ED75311B4B0 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Copy Pods Resources + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh" + + showEnvVarsInLog + 0 + + 4CCE21315897B7D544C83242 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + net.daringfireball.markdown + name + README.md + path + ../README.md + sourceTree + <group> + + 6003F581195388D10070C39A + + children + + 60FF7A9C1954A5C5007DD14C + 6003F593195388D20070C39A + 6003F5B5195388D20070C39A + 6003F58C195388D20070C39A + 6003F58B195388D20070C39A + CCE77F10C6D41F74B075ECD0 + + isa + PBXGroup + sourceTree + <group> + + 6003F582195388D10070C39A + + attributes + + CLASSPREFIX + SWG + LastUpgradeCheck + 0510 + ORGANIZATIONNAME + geekerzp + + buildConfigurationList + 6003F585195388D10070C39A + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + Base + + mainGroup + 6003F581195388D10070C39A + productRefGroup + 6003F58B195388D20070C39A + projectDirPath + + projectReferences + + projectRoot + + targets + + 6003F589195388D20070C39A + 6003F5AD195388D20070C39A + + + 6003F585195388D10070C39A + + buildConfigurations + + 6003F5BD195388D20070C39A + 6003F5BE195388D20070C39A + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6003F586195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F59E195388D20070C39A + 6003F5A7195388D20070C39A + 6003F59A195388D20070C39A + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F587195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F590195388D20070C39A + 6003F592195388D20070C39A + 6003F58E195388D20070C39A + 94BE6BE84795B5034A811E61 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F588195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F598195388D20070C39A + B2ADC17C287DCABF329BA8AC + B2ADC2D632658A5F73C6CE66 + B2ADC56977372855A63F4E4D + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F589195388D20070C39A + + buildConfigurationList + 6003F5BF195388D20070C39A + buildPhases + + 799E7E29D924C30424DFBA28 + 6003F586195388D20070C39A + 6003F587195388D20070C39A + 6003F588195388D20070C39A + 429AF5C69E165ED75311B4B0 + 183E54C09C54DAEB54B2546F + DA8DD6AAE903F2CD38F2D9D5 + + buildRules + + dependencies + + isa + PBXNativeTarget + name + SwaggerClient_Example + productName + SwaggerClient + productReference + 6003F58A195388D20070C39A + productType + com.apple.product-type.application + + 6003F58A195388D20070C39A + + explicitFileType + wrapper.application + includeInIndex + 0 + isa + PBXFileReference + path + SwaggerClient_Example.app + sourceTree + BUILT_PRODUCTS_DIR + + 6003F58B195388D20070C39A + + children + + 6003F58A195388D20070C39A + 6003F5AE195388D20070C39A + B2ADC084A2C0BDF217832B03 + + isa + PBXGroup + name + Products + sourceTree + <group> + + 6003F58C195388D20070C39A + + children + + 6003F58D195388D20070C39A + 6003F58F195388D20070C39A + 6003F591195388D20070C39A + 6003F5AF195388D20070C39A + 8D46325ECAD48245C07F6733 + FDEF5BA3CF9CFFDEB5A47DB4 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 6003F58D195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + System/Library/Frameworks/Foundation.framework + sourceTree + SDKROOT + + 6003F58E195388D20070C39A + + fileRef + 6003F58D195388D20070C39A + isa + PBXBuildFile + + 6003F58F195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + CoreGraphics.framework + path + System/Library/Frameworks/CoreGraphics.framework + sourceTree + SDKROOT + + 6003F590195388D20070C39A + + fileRef + 6003F58F195388D20070C39A + isa + PBXBuildFile + + 6003F591195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + UIKit.framework + path + System/Library/Frameworks/UIKit.framework + sourceTree + SDKROOT + + 6003F592195388D20070C39A + + fileRef + 6003F591195388D20070C39A + isa + PBXBuildFile + + 6003F593195388D20070C39A + + children + + 6003F59C195388D20070C39A + 6003F59D195388D20070C39A + 6003F5A5195388D20070C39A + 6003F5A6195388D20070C39A + 6003F594195388D20070C39A + + isa + PBXGroup + name + Example for SwaggerClient + path + SwaggerClient + sourceTree + <group> + + 6003F594195388D20070C39A + + children + + 6003F595195388D20070C39A + 6003F596195388D20070C39A + 6003F599195388D20070C39A + 6003F59B195388D20070C39A + + isa + PBXGroup + name + Supporting Files + sourceTree + <group> + + 6003F595195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + SwaggerClient-Info.plist + sourceTree + <group> + + 6003F596195388D20070C39A + + children + + 6003F597195388D20070C39A + + isa + PBXVariantGroup + name + InfoPlist.strings + sourceTree + <group> + + 6003F597195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + text.plist.strings + name + en + path + en.lproj/InfoPlist.strings + sourceTree + <group> + + 6003F598195388D20070C39A + + fileRef + 6003F596195388D20070C39A + isa + PBXBuildFile + + 6003F599195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + main.m + sourceTree + <group> + + 6003F59A195388D20070C39A + + fileRef + 6003F599195388D20070C39A + isa + PBXBuildFile + + 6003F59B195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + SwaggerClient-Prefix.pch + sourceTree + <group> + + 6003F59C195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + SWGAppDelegate.h + sourceTree + <group> + + 6003F59D195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + SWGAppDelegate.m + sourceTree + <group> + + 6003F59E195388D20070C39A + + fileRef + 6003F59D195388D20070C39A + isa + PBXBuildFile + + 6003F5A5195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + SWGViewController.h + sourceTree + <group> + + 6003F5A6195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + SWGViewController.m + sourceTree + <group> + + 6003F5A7195388D20070C39A + + fileRef + 6003F5A6195388D20070C39A + isa + PBXBuildFile + + 6003F5AA195388D20070C39A + + buildActionMask + 2147483647 + files + + CFDFB4141B3CFFF6009739C5 + CF0ADB481B5F95D6008A2729 + CFDFB4131B3CFFDD009739C5 + 6003F5BC195388D20070C39A + CFDFB4151B3D000B009739C5 + CFDFB4121B3CFFA8009739C5 + CF8F71391B5F73AC00162980 + B2ADC0B1C8A60A05C48B4DF7 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F5AB195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F5B0195388D20070C39A + 6003F5B2195388D20070C39A + 6003F5B1195388D20070C39A + 158CE3AA214CB1B31C7ADC48 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F5AC195388D20070C39A + + buildActionMask + 2147483647 + files + + 6003F5BA195388D20070C39A + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6003F5AD195388D20070C39A + + buildConfigurationList + 6003F5C2195388D20070C39A + buildPhases + + 7B069562A9F91E498732474F + 6003F5AA195388D20070C39A + 6003F5AB195388D20070C39A + 6003F5AC195388D20070C39A + E337D7E459CCFFDF27046FFC + 111D7956304BD6E860AA8709 + FD42985CC653969FE997DEC9 + + buildRules + + dependencies + + 6003F5B4195388D20070C39A + + isa + PBXNativeTarget + name + SwaggerClient_Tests + productName + SwaggerClientTests + productReference + 6003F5AE195388D20070C39A + productType + com.apple.product-type.bundle.unit-test + + 6003F5AE195388D20070C39A + + explicitFileType + wrapper.cfbundle + includeInIndex + 0 + isa + PBXFileReference + path + SwaggerClient_Tests.xctest + sourceTree + BUILT_PRODUCTS_DIR + + 6003F5AF195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + XCTest.framework + path + Library/Frameworks/XCTest.framework + sourceTree + DEVELOPER_DIR + + 6003F5B0195388D20070C39A + + fileRef + 6003F5AF195388D20070C39A + isa + PBXBuildFile + + 6003F5B1195388D20070C39A + + fileRef + 6003F58D195388D20070C39A + isa + PBXBuildFile + + 6003F5B2195388D20070C39A + + fileRef + 6003F591195388D20070C39A + isa + PBXBuildFile + + 6003F5B3195388D20070C39A + + containerPortal + 6003F582195388D10070C39A + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 6003F589195388D20070C39A + remoteInfo + SwaggerClient + + 6003F5B4195388D20070C39A + + isa + PBXTargetDependency + target + 6003F589195388D20070C39A + targetProxy + 6003F5B3195388D20070C39A + + 6003F5B5195388D20070C39A + + children + + CFDFB40A1B3CFEC3009739C5 + CFDFB40B1B3CFEC3009739C5 + CFDFB40C1B3CFEC3009739C5 + CF0ADB471B5F95D6008A2729 + CF8F71381B5F73AC00162980 + CFDFB40D1B3CFEC3009739C5 + 6003F5BB195388D20070C39A + 6003F5B6195388D20070C39A + B2ADCA62DE4AC0F5BAB42208 + + isa + PBXGroup + path + Tests + sourceTree + <group> + + 6003F5B6195388D20070C39A + + children + + 6003F5B7195388D20070C39A + 6003F5B8195388D20070C39A + 606FC2411953D9B200FFA9A0 + + isa + PBXGroup + name + Supporting Files + sourceTree + <group> + + 6003F5B7195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Tests-Info.plist + sourceTree + <group> + + 6003F5B8195388D20070C39A + + children + + 6003F5B9195388D20070C39A + + isa + PBXVariantGroup + name + InfoPlist.strings + sourceTree + <group> + + 6003F5B9195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + text.plist.strings + name + en + path + en.lproj/InfoPlist.strings + sourceTree + <group> + + 6003F5BA195388D20070C39A + + fileRef + 6003F5B8195388D20070C39A + isa + PBXBuildFile + + 6003F5BB195388D20070C39A + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Tests.m + sourceTree + <group> + + 6003F5BC195388D20070C39A + + fileRef + 6003F5BB195388D20070C39A + isa + PBXBuildFile + + 6003F5BD195388D20070C39A + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + CLANG_WARN__DUPLICATE_METHOD_MATCH + YES + CODE_SIGN_IDENTITY[sdk=iphoneos*] + iPhone Developer + COPY_PHASE_STRIP + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + 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 + 7.1 + ONLY_ACTIVE_ARCH + YES + SDKROOT + iphoneos + TARGETED_DEVICE_FAMILY + 1,2 + + isa + XCBuildConfiguration + name + Debug + + 6003F5BE195388D20070C39A + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + CLANG_WARN__DUPLICATE_METHOD_MATCH + YES + CODE_SIGN_IDENTITY[sdk=iphoneos*] + iPhone Developer + COPY_PHASE_STRIP + YES + ENABLE_NS_ASSERTIONS + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + 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 + 7.1 + SDKROOT + iphoneos + TARGETED_DEVICE_FAMILY + 1,2 + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 6003F5BF195388D20070C39A + + buildConfigurations + + 6003F5C0195388D20070C39A + 6003F5C1195388D20070C39A + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6003F5C0195388D20070C39A + + baseConfigurationReference + E445A633FA767F207D7EE6CE + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME + LaunchImage + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + SwaggerClient/SwaggerClient-Prefix.pch + INFOPLIST_FILE + SwaggerClient/SwaggerClient-Info.plist + MODULE_NAME + ExampleApp + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + app + + isa + XCBuildConfiguration + name + Debug + + 6003F5C1195388D20070C39A + + baseConfigurationReference + BFB4BE760737508B3CFC23B2 + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME + LaunchImage + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + SwaggerClient/SwaggerClient-Prefix.pch + INFOPLIST_FILE + SwaggerClient/SwaggerClient-Info.plist + MODULE_NAME + ExampleApp + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + app + + isa + XCBuildConfiguration + name + Release + + 6003F5C2195388D20070C39A + + buildConfigurations + + 6003F5C3195388D20070C39A + 6003F5C4195388D20070C39A + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6003F5C3195388D20070C39A + + baseConfigurationReference + 73CCD82196AABD64F2807C7B + buildSettings + + FRAMEWORK_SEARCH_PATHS + + $(SDKROOT)/Developer/Library/Frameworks + $(inherited) + $(DEVELOPER_FRAMEWORKS_DIR) + + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Tests/Tests-Prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + INFOPLIST_FILE + Tests/Tests-Info.plist + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + xctest + + isa + XCBuildConfiguration + name + Debug + + 6003F5C4195388D20070C39A + + baseConfigurationReference + 1A81C3BE3E54961CD827EAE3 + buildSettings + + FRAMEWORK_SEARCH_PATHS + + $(SDKROOT)/Developer/Library/Frameworks + $(inherited) + $(DEVELOPER_FRAMEWORKS_DIR) + + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Tests/Tests-Prefix.pch + INFOPLIST_FILE + Tests/Tests-Info.plist + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + xctest + + isa + XCBuildConfiguration + name + Release + + 606FC2411953D9B200FFA9A0 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Tests-Prefix.pch + sourceTree + <group> + + 60FF7A9C1954A5C5007DD14C + + children + + E9675D953C6DCDE71A1BDFD4 + 4CCE21315897B7D544C83242 + B2ADC7027D4B025ABCA7999F + B2ADC65E342ADA697322D68C + + isa + PBXGroup + name + Podspec Metadata + sourceTree + <group> + + 73CCD82196AABD64F2807C7B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SwaggerClient_Tests.debug.xcconfig + path + Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig + sourceTree + <group> + + 799E7E29D924C30424DFBA28 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Check Pods Manifest.lock + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null +if [[ $? != 0 ]] ; then + cat << EOM +error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. +EOM + exit 1 +fi + + showEnvVarsInLog + 0 + + 7B069562A9F91E498732474F + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Check Pods Manifest.lock + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null +if [[ $? != 0 ]] ; then + cat << EOM +error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. +EOM + exit 1 +fi + + showEnvVarsInLog + 0 + + 8D46325ECAD48245C07F6733 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SwaggerClient_Example.a + sourceTree + BUILT_PRODUCTS_DIR + + 94BE6BE84795B5034A811E61 + + fileRef + 8D46325ECAD48245C07F6733 + isa + PBXBuildFile + + B2ADC084A2C0BDF217832B03 + + isa + PBXFileReference + lastKnownFileType + file.storyboard + name + Launch Screen.storyboard + path + SwaggerClient/Launch Screen.storyboard + sourceTree + <group> + + B2ADC0B1C8A60A05C48B4DF7 + + fileRef + B2ADC55130D5E329ED945E8F + isa + PBXBuildFile + + B2ADC17C287DCABF329BA8AC + + fileRef + B2ADC7027D4B025ABCA7999F + isa + PBXBuildFile + + B2ADC2D632658A5F73C6CE66 + + fileRef + B2ADC65E342ADA697322D68C + isa + PBXBuildFile + + B2ADC2F3483B3117A00FA91C + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + DatabaseHelper.h + sourceTree + <group> + + B2ADC55130D5E329ED945E8F + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + DatabaseHelper.m + sourceTree + <group> + + B2ADC56977372855A63F4E4D + + fileRef + B2ADC084A2C0BDF217832B03 + isa + PBXBuildFile + + B2ADC65E342ADA697322D68C + + isa + PBXFileReference + lastKnownFileType + folder.assetcatalog + name + Images.xcassets + path + SwaggerClient/Images.xcassets + sourceTree + <group> + + B2ADC7027D4B025ABCA7999F + + isa + PBXFileReference + lastKnownFileType + file.storyboard + name + Main.storyboard + path + SwaggerClient/Main.storyboard + sourceTree + <group> + + B2ADCA62DE4AC0F5BAB42208 + + children + + B2ADC2F3483B3117A00FA91C + B2ADC55130D5E329ED945E8F + + isa + PBXGroup + path + Helpers + sourceTree + <group> + + BFB4BE760737508B3CFC23B2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SwaggerClient_Example.release.xcconfig + path + Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig + sourceTree + <group> + + CCE77F10C6D41F74B075ECD0 + + children + + E445A633FA767F207D7EE6CE + BFB4BE760737508B3CFC23B2 + 73CCD82196AABD64F2807C7B + 1A81C3BE3E54961CD827EAE3 + + isa + PBXGroup + name + Pods + sourceTree + <group> + + CF0ADB471B5F95D6008A2729 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + PetTest.m + sourceTree + <group> + + CF0ADB481B5F95D6008A2729 + + fileRef + CF0ADB471B5F95D6008A2729 + isa + PBXBuildFile + + CF8F71381B5F73AC00162980 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + DeserializationTest.m + sourceTree + <group> + + CF8F71391B5F73AC00162980 + + fileRef + CF8F71381B5F73AC00162980 + isa + PBXBuildFile + + CFDFB40A1B3CFEC3009739C5 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + PetApiTest.m + sourceTree + <group> + + CFDFB40B1B3CFEC3009739C5 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + StoreApiTest.m + sourceTree + <group> + + CFDFB40C1B3CFEC3009739C5 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + SWGApiClientTest.m + sourceTree + <group> + + CFDFB40D1B3CFEC3009739C5 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + UserApiTest.m + sourceTree + <group> + + CFDFB4121B3CFFA8009739C5 + + fileRef + CFDFB40D1B3CFEC3009739C5 + isa + PBXBuildFile + + CFDFB4131B3CFFDD009739C5 + + fileRef + CFDFB40A1B3CFEC3009739C5 + isa + PBXBuildFile + + CFDFB4141B3CFFF6009739C5 + + fileRef + CFDFB40B1B3CFEC3009739C5 + isa + PBXBuildFile + + CFDFB4151B3D000B009739C5 + + fileRef + CFDFB40C1B3CFEC3009739C5 + isa + PBXBuildFile + + DA8DD6AAE903F2CD38F2D9D5 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh" + + showEnvVarsInLog + 0 + + E337D7E459CCFFDF27046FFC + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + 📦 Copy Pods Resources + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh" + + showEnvVarsInLog + 0 + + E445A633FA767F207D7EE6CE + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SwaggerClient_Example.debug.xcconfig + path + Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig + sourceTree + <group> + + E9675D953C6DCDE71A1BDFD4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + name + SwaggerClient.podspec + path + ../SwaggerClient.podspec + sourceTree + <group> + + FD42985CC653969FE997DEC9 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh" + + showEnvVarsInLog + 0 + + FDEF5BA3CF9CFFDEB5A47DB4 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SwaggerClient_Tests.a + sourceTree + BUILT_PRODUCTS_DIR + + + rootObject + 6003F582195388D10070C39A + + diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient/SWGViewController.m b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient/SWGViewController.m index 7f8e3d67881..d1ee531e2f0 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient/SWGViewController.m +++ b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient/SWGViewController.m @@ -10,7 +10,7 @@ #import #import #import -#import +#import @interface SWGViewController () @@ -22,7 +22,7 @@ { [super viewDidLoad]; - SWGConfiguration *config = [SWGConfiguration sharedConfig]; + SWGDefaultConfiguration *config = [SWGDefaultConfiguration sharedConfig]; config.debug = YES; SWGPetApi *api = [[SWGPetApi alloc] init]; diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/Tests/SWGApiClientTest.m b/samples/client/petstore/objc/default/SwaggerClientTests/Tests/SWGApiClientTest.m index 335e4f50bb2..7e78cae4840 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/Tests/SWGApiClientTest.m +++ b/samples/client/petstore/objc/default/SwaggerClientTests/Tests/SWGApiClientTest.m @@ -2,6 +2,9 @@ #import #import #import +#import +#import +#import @interface SWGApiClientTest : XCTestCase @@ -86,7 +89,7 @@ } - (void)testConfiguration { - SWGConfiguration *config = [SWGConfiguration sharedConfig]; + SWGDefaultConfiguration *config = [SWGDefaultConfiguration sharedConfig]; [config setApiKey:@"123456" forApiKeyIdentifier:@"api_key"]; [config setApiKeyPrefix:@"PREFIX" forApiKeyPrefixIdentifier:@"api_key"]; config.username = @"test_username"; @@ -113,7 +116,7 @@ } - (void)testGetBasicAuthToken { - SWGConfiguration *config = [SWGConfiguration sharedConfig]; + SWGDefaultConfiguration *config = [SWGDefaultConfiguration sharedConfig]; config.username = @"test_username"; config.password = @"test_password"; diff --git a/samples/client/petstore/objc/default/docs/SWGPetApi.md b/samples/client/petstore/objc/default/docs/SWGPetApi.md index 92fb2c4de81..bfeaacfa366 100644 --- a/samples/client/petstore/objc/default/docs/SWGPetApi.md +++ b/samples/client/petstore/objc/default/docs/SWGPetApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **addPet** ```objc --(NSNumber*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler; ``` @@ -26,7 +26,7 @@ Add a new pet to the store ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; @@ -68,7 +68,7 @@ void (empty response body) # **deletePet** ```objc --(NSNumber*) deletePetWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) deletePetWithPetId: (NSNumber*) petId apiKey: (NSString*) apiKey completionHandler: (void (^)(NSError* error)) handler; ``` @@ -79,7 +79,7 @@ Deletes a pet ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; @@ -124,7 +124,7 @@ void (empty response body) # **findPetsByStatus** ```objc --(NSNumber*) findPetsByStatusWithStatus: (NSArray*) status +-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status completionHandler: (void (^)(NSArray* output, NSError* error)) handler; ``` @@ -134,7 +134,7 @@ Multiple status values can be provided with comma seperated strings ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; @@ -179,7 +179,7 @@ Name | Type | Description | Notes # **findPetsByTags** ```objc --(NSNumber*) findPetsByTagsWithTags: (NSArray*) tags +-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags completionHandler: (void (^)(NSArray* output, NSError* error)) handler; ``` @@ -189,7 +189,7 @@ Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; @@ -234,7 +234,7 @@ Name | Type | Description | Notes # **getPetById** ```objc --(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) getPetByIdWithPetId: (NSNumber*) petId completionHandler: (void (^)(SWGPet* output, NSError* error)) handler; ``` @@ -244,16 +244,16 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; + +// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; // Configure API key authorization: (authentication scheme: api_key) [apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"]; // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed //[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"]; -// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; - NSNumber* petId = @789; // ID of pet that needs to be fetched @@ -283,7 +283,7 @@ Name | Type | Description | Notes ### Authorization -[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth) +[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) ### HTTP request headers @@ -294,7 +294,7 @@ Name | Type | Description | Notes # **updatePet** ```objc --(NSNumber*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler; ``` @@ -304,7 +304,7 @@ Update an existing pet ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; @@ -346,7 +346,7 @@ void (empty response body) # **updatePetWithForm** ```objc --(NSNumber*) updatePetWithFormWithPetId: (NSString*) petId +-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId name: (NSString*) name status: (NSString*) status completionHandler: (void (^)(NSError* error)) handler; @@ -358,7 +358,7 @@ Updates a pet in the store with form data ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; @@ -406,7 +406,7 @@ void (empty response body) # **uploadFile** ```objc --(NSNumber*) uploadFileWithPetId: (NSNumber*) petId +-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId additionalMetadata: (NSString*) additionalMetadata file: (NSURL*) file completionHandler: (void (^)(NSError* error)) handler; @@ -418,7 +418,7 @@ uploads an image ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; diff --git a/samples/client/petstore/objc/default/docs/SWGStoreApi.md b/samples/client/petstore/objc/default/docs/SWGStoreApi.md index 12bcef79a40..3124b5c6458 100644 --- a/samples/client/petstore/objc/default/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/default/docs/SWGStoreApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **deleteOrder** ```objc --(NSNumber*) deleteOrderWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) deleteOrderWithOrderId: (NSString*) orderId completionHandler: (void (^)(NSError* error)) handler; ``` @@ -59,7 +59,7 @@ No authorization required # **getInventory** ```objc --(NSNumber*) getInventoryWithCompletionHandler: +-(NSURLSessionTask*) getInventoryWithCompletionHandler: (void (^)(NSDictionary* output, NSError* error)) handler; ``` @@ -69,7 +69,7 @@ Returns a map of status codes to quantities ### Example ```objc -SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; // Configure API key authorization: (authentication scheme: api_key) [apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"]; @@ -112,7 +112,7 @@ This endpoint does not need any parameter. # **getOrderById** ```objc --(NSNumber*) getOrderByIdWithOrderId: (NSString*) orderId +-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; ``` @@ -162,7 +162,7 @@ No authorization required # **placeOrder** ```objc --(NSNumber*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; ``` diff --git a/samples/client/petstore/objc/default/docs/SWGUserApi.md b/samples/client/petstore/objc/default/docs/SWGUserApi.md index c7a62f3b3c4..bffba171129 100644 --- a/samples/client/petstore/objc/default/docs/SWGUserApi.md +++ b/samples/client/petstore/objc/default/docs/SWGUserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** ```objc --(NSNumber*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler; ``` @@ -63,7 +63,7 @@ No authorization required # **createUsersWithArrayInput** ```objc --(NSNumber*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler; ``` @@ -110,7 +110,7 @@ No authorization required # **createUsersWithListInput** ```objc --(NSNumber*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler; ``` @@ -157,7 +157,7 @@ No authorization required # **deleteUser** ```objc --(NSNumber*) deleteUserWithUsername: (NSString*) username +-(NSURLSessionTask*) deleteUserWithUsername: (NSString*) username completionHandler: (void (^)(NSError* error)) handler; ``` @@ -204,7 +204,7 @@ No authorization required # **getUserByName** ```objc --(NSNumber*) getUserByNameWithUsername: (NSString*) username +-(NSURLSessionTask*) getUserByNameWithUsername: (NSString*) username completionHandler: (void (^)(SWGUser* output, NSError* error)) handler; ``` @@ -254,7 +254,7 @@ No authorization required # **loginUser** ```objc --(NSNumber*) loginUserWithUsername: (NSString*) username +-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username password: (NSString*) password completionHandler: (void (^)(NSString* output, NSError* error)) handler; ``` @@ -308,7 +308,7 @@ No authorization required # **logoutUser** ```objc --(NSNumber*) logoutUserWithCompletionHandler: +-(NSURLSessionTask*) logoutUserWithCompletionHandler: (void (^)(NSError* error)) handler; ``` @@ -351,7 +351,7 @@ No authorization required # **updateUser** ```objc --(NSNumber*) updateUserWithUsername: (NSString*) username +-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username body: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler; ``` From a893168291804a060dea397da4c6f5ac5aa21dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Mac=CC=81kowiak?= Date: Wed, 17 Aug 2016 10:21:24 +0200 Subject: [PATCH 002/182] [ObjC] Add version define and share default headers of each client --- .../resources/objc/ApiClient-body.mustache | 11 +- .../objc/Configuration-protocol.mustache | 5 +- .../objc/DefaultConfiguration-body.mustache | 1 + .../objc/DefaultConfiguration-header.mustache | 2 + .../src/main/resources/objc/api-body.mustache | 17 +- .../main/resources/objc/api-protocol.mustache | 8 +- .../src/main/resources/objc/podspec.mustache | 4 +- .../client/petstore/objc/core-data/README.md | 2 +- .../core-data/SwaggerClient/Api/SWGPetApi.m | 17 +- .../core-data/SwaggerClient/Api/SWGStoreApi.m | 17 +- .../core-data/SwaggerClient/Api/SWGUserApi.m | 17 +- .../core-data/SwaggerClient/Core/SWGApi.h | 8 +- .../SwaggerClient/Core/SWGApiClient.m | 11 +- .../SwaggerClient/Core/SWGConfiguration.h | 5 +- .../Core/SWGDefaultConfiguration.h | 2 + .../Core/SWGDefaultConfiguration.m | 1 + .../SwaggerClient.xcodeproj/project.pbxproj | 2098 +++++---------- .../xcshareddata/xcschemes/All Tests.xcscheme | 55 +- .../xcschemes/SwaggerClient-Example.xcscheme | 13 +- .../SwaggerClient/SwaggerClient-Info.plist | 2 +- .../SwaggerClientTests/Tests/Tests-Info.plist | 2 +- .../client/petstore/objc/default/README.md | 2 +- .../default/SwaggerClient/Api/SWGPetApi.m | 17 +- .../default/SwaggerClient/Api/SWGStoreApi.m | 17 +- .../default/SwaggerClient/Api/SWGUserApi.m | 17 +- .../objc/default/SwaggerClient/Core/SWGApi.h | 8 +- .../default/SwaggerClient/Core/SWGApiClient.m | 11 +- .../SwaggerClient/Core/SWGConfiguration.h | 5 +- .../Core/SWGDefaultConfiguration.h | 2 + .../Core/SWGDefaultConfiguration.m | 1 + .../SwaggerClient.xcodeproj/project.pbxproj | 2252 +++++------------ .../xcshareddata/xcschemes/All Tests.xcscheme | 55 +- .../xcschemes/SwaggerClient-Example.xcscheme | 13 +- .../SwaggerClient/SwaggerClient-Info.plist | 2 +- .../SwaggerClientTests/Tests/Tests-Info.plist | 2 +- 35 files changed, 1569 insertions(+), 3133 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache b/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache index 94529bf6dda..2c52f2058e3 100644 --- a/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache @@ -1,5 +1,6 @@ #import +#import "{{classPrefix}}Logger.h" #import "{{classPrefix}}ApiClient.h" #import "{{classPrefix}}JSONRequestSerializer.h" #import "{{classPrefix}}JSONResponseSerializer.h" @@ -62,24 +63,18 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) #pragma mark - Initialize Methods - (instancetype)init { - return [self initWithConfiguration:[{{classPrefix}}DefaultConfiguration sharedConfig]]; } - (instancetype)initWithBaseURL:(NSURL *)url { - - return [self initWithBaseURL:url - configuration:[{{classPrefix}}DefaultConfiguration sharedConfig]]; - + return [self initWithBaseURL:url configuration:[{{classPrefix}}DefaultConfiguration sharedConfig]]; } - (instancetype)initWithConfiguration:(id<{{classPrefix}}Configuration>)configuration { - return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration]; } -- (instancetype)initWithBaseURL:(NSURL *)url - configuration:(id<{{classPrefix}}Configuration>)configuration { +- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id<{{classPrefix}}Configuration>)configuration { self = [super initWithBaseURL:url]; if (self) { diff --git a/modules/swagger-codegen/src/main/resources/objc/Configuration-protocol.mustache b/modules/swagger-codegen/src/main/resources/objc/Configuration-protocol.mustache index db429a38150..ffb6b6971f0 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Configuration-protocol.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Configuration-protocol.mustache @@ -1,8 +1,11 @@ #import -#import "{{classPrefix}}Logger.h" + +@class {{classPrefix}}Logger; {{>licenceInfo}} +static NSString * const k{{classPrefix}}APIVersion = @"{{podVersion}}"; + @protocol {{classPrefix}}Configuration /** diff --git a/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache index 7c2b6cda20b..ff8c9ea6577 100644 --- a/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache @@ -1,5 +1,6 @@ #import "{{classPrefix}}DefaultConfiguration.h" #import "{{classPrefix}}BasicAuthTokenProvider.h" +#import "{{classPrefix}}Logger.h" @interface {{classPrefix}}DefaultConfiguration () diff --git a/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-header.mustache b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-header.mustache index f93c864ecfe..0227b0fb2b4 100644 --- a/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-header.mustache @@ -3,6 +3,8 @@ {{>licenceInfo}} +@class {{classPrefix}}ApiClient; + @interface {{classPrefix}}DefaultConfiguration : NSObject <{{classPrefix}}Configuration> diff --git a/modules/swagger-codegen/src/main/resources/objc/api-body.mustache b/modules/swagger-codegen/src/main/resources/objc/api-body.mustache index 505cfdd3c88..80a047b80b2 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-body.mustache @@ -1,13 +1,14 @@ {{#operations}} #import "{{classname}}.h" #import "{{classPrefix}}QueryParamCollection.h" +#import "{{classPrefix}}ApiClient.h" {{#imports}}#import "{{import}}.h" {{/imports}} {{newline}} @interface {{classname}} () -@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders; @end @@ -29,7 +30,7 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; self = [super init]; if (self) { _apiClient = apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; } return self; } @@ -37,15 +38,15 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; #pragma mark - -(NSString*) defaultHeaderForKey:(NSString*)key { - return self.defaultHeaders[key]; -} - --(void) addHeader:(NSString*)value forKey:(NSString*)key { - [self setDefaultHeaderValue:value forKey:key]; + return self.mutableDefaultHeaders[key]; } -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key { - [self.defaultHeaders setValue:value forKey:key]; + [self.mutableDefaultHeaders setValue:value forKey:key]; +} + +-(NSDictionary *)defaultHeaders { + return self.mutableDefaultHeaders; } #pragma mark - Api Methods diff --git a/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache b/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache index d8dadda1d0c..5651150589c 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache @@ -1,6 +1,6 @@ #import -#import "{{classPrefix}}Object.h" -#import "{{classPrefix}}ApiClient.h" + +@class {{classPrefix}}ApiClient; {{>licenceInfo}} @@ -10,9 +10,9 @@ -(instancetype) initWithApiClient:({{classPrefix}}ApiClient *)apiClient; --(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:"); - -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; -(NSString*) defaultHeaderForKey:(NSString*)key; +-(NSDictionary *)defaultHeaders; + @end diff --git a/modules/swagger-codegen/src/main/resources/objc/podspec.mustache b/modules/swagger-codegen/src/main/resources/objc/podspec.mustache index 7a2b22bea28..88c4ab0613f 100644 --- a/modules/swagger-codegen/src/main/resources/objc/podspec.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/podspec.mustache @@ -12,9 +12,9 @@ Pod::Spec.new do |s| s.version = "{{podVersion}}" {{#apiInfo}}{{#apis}}{{^hasMore}} s.summary = "{{appName}}" - s.description = <<-DESC +{{{#appDescription}}} s.description = <<-DESC {{{appDescription}}} - DESC + DESC{{{/appDescription}}} {{/hasMore}}{{/apis}}{{/apiInfo}} s.platform = :ios, '7.0' s.requires_arc = true diff --git a/samples/client/petstore/objc/core-data/README.md b/samples/client/petstore/objc/core-data/README.md index 928576550bb..5d44a3059a4 100644 --- a/samples/client/petstore/objc/core-data/README.md +++ b/samples/client/petstore/objc/core-data/README.md @@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi - API version: 1.0.0 - Package version: -- Build date: 2016-08-04T12:24:23.866+02:00 +- Build date: 2016-08-17T10:06:58.453+02:00 - Build package: class io.swagger.codegen.languages.ObjcClientCodegen ## Requirements diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m index 5551bffae9a..0034dd69fc5 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m @@ -1,11 +1,12 @@ #import "SWGPetApi.h" #import "SWGQueryParamCollection.h" +#import "SWGApiClient.h" #import "SWGPet.h" @interface SWGPetApi () -@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders; @end @@ -27,7 +28,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; self = [super init]; if (self) { _apiClient = apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; } return self; } @@ -35,15 +36,15 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; #pragma mark - -(NSString*) defaultHeaderForKey:(NSString*)key { - return self.defaultHeaders[key]; -} - --(void) addHeader:(NSString*)value forKey:(NSString*)key { - [self setDefaultHeaderValue:value forKey:key]; + return self.mutableDefaultHeaders[key]; } -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key { - [self.defaultHeaders setValue:value forKey:key]; + [self.mutableDefaultHeaders setValue:value forKey:key]; +} + +-(NSDictionary *)defaultHeaders { + return self.mutableDefaultHeaders; } #pragma mark - Api Methods diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m index a275c1f0568..2a17173f83a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m @@ -1,11 +1,12 @@ #import "SWGStoreApi.h" #import "SWGQueryParamCollection.h" +#import "SWGApiClient.h" #import "SWGOrder.h" @interface SWGStoreApi () -@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders; @end @@ -27,7 +28,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; self = [super init]; if (self) { _apiClient = apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; } return self; } @@ -35,15 +36,15 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; #pragma mark - -(NSString*) defaultHeaderForKey:(NSString*)key { - return self.defaultHeaders[key]; -} - --(void) addHeader:(NSString*)value forKey:(NSString*)key { - [self setDefaultHeaderValue:value forKey:key]; + return self.mutableDefaultHeaders[key]; } -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key { - [self.defaultHeaders setValue:value forKey:key]; + [self.mutableDefaultHeaders setValue:value forKey:key]; +} + +-(NSDictionary *)defaultHeaders { + return self.mutableDefaultHeaders; } #pragma mark - Api Methods diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m index 58e1729f490..e1acf3af007 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m @@ -1,11 +1,12 @@ #import "SWGUserApi.h" #import "SWGQueryParamCollection.h" +#import "SWGApiClient.h" #import "SWGUser.h" @interface SWGUserApi () -@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders; @end @@ -27,7 +28,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; self = [super init]; if (self) { _apiClient = apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; } return self; } @@ -35,15 +36,15 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; #pragma mark - -(NSString*) defaultHeaderForKey:(NSString*)key { - return self.defaultHeaders[key]; -} - --(void) addHeader:(NSString*)value forKey:(NSString*)key { - [self setDefaultHeaderValue:value forKey:key]; + return self.mutableDefaultHeaders[key]; } -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key { - [self.defaultHeaders setValue:value forKey:key]; + [self.mutableDefaultHeaders setValue:value forKey:key]; +} + +-(NSDictionary *)defaultHeaders { + return self.mutableDefaultHeaders; } #pragma mark - Api Methods diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h index c02d289a336..23af90b6117 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h @@ -1,6 +1,6 @@ #import -#import "SWGObject.h" -#import "SWGApiClient.h" + +@class SWGApiClient; /** * Swagger Petstore @@ -32,9 +32,9 @@ -(instancetype) initWithApiClient:(SWGApiClient *)apiClient; --(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:"); - -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; -(NSString*) defaultHeaderForKey:(NSString*)key; +-(NSDictionary *)defaultHeaders; + @end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m index d4758d36b03..e29f3a8f55f 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m @@ -1,5 +1,6 @@ #import +#import "SWGLogger.h" #import "SWGApiClient.h" #import "SWGJSONRequestSerializer.h" #import "SWGJSONResponseSerializer.h" @@ -62,24 +63,18 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { #pragma mark - Initialize Methods - (instancetype)init { - return [self initWithConfiguration:[SWGDefaultConfiguration sharedConfig]]; } - (instancetype)initWithBaseURL:(NSURL *)url { - - return [self initWithBaseURL:url - configuration:[SWGDefaultConfiguration sharedConfig]]; - + return [self initWithBaseURL:url configuration:[SWGDefaultConfiguration sharedConfig]]; } - (instancetype)initWithConfiguration:(id)configuration { - return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration]; } -- (instancetype)initWithBaseURL:(NSURL *)url - configuration:(id)configuration { +- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id)configuration { self = [super initWithBaseURL:url]; if (self) { diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h index a85a47d4bc8..864d87d2535 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h @@ -1,5 +1,6 @@ #import -#import "SWGLogger.h" + +@class SWGLogger; /** * Swagger Petstore @@ -25,6 +26,8 @@ * limitations under the License. */ +static NSString * const kSWGAPIVersion = @"1.0.0"; + @protocol SWGConfiguration /** diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h index cd44d30e551..48cedd5d558 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -25,6 +25,8 @@ * limitations under the License. */ +@class SWGApiClient; + @interface SWGDefaultConfiguration : NSObject diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m index cd37ae35859..225d24155eb 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m @@ -1,5 +1,6 @@ #import "SWGDefaultConfiguration.h" #import "SWGBasicAuthTokenProvider.h" +#import "SWGLogger.h" @interface SWGDefaultConfiguration () diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj index bbdc648f467..7ee3eb8862d 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -1,1440 +1,658 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 111D7956304BD6E860AA8709 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh" - - showEnvVarsInLog - 0 - - 158CE3AA214CB1B31C7ADC48 - - fileRef - FDEF5BA3CF9CFFDEB5A47DB4 - isa - PBXBuildFile - - 183E54C09C54DAEB54B2546F - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh" - - showEnvVarsInLog - 0 - - 1A81C3BE3E54961CD827EAE3 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-SwaggerClient_Tests.release.xcconfig - path - Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig - sourceTree - <group> - - 429AF5C69E165ED75311B4B0 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Copy Pods Resources - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh" - - showEnvVarsInLog - 0 - - 4CCE21315897B7D544C83242 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - net.daringfireball.markdown - name - README.md - path - ../README.md - sourceTree - <group> - - 6003F581195388D10070C39A - - children - - 60FF7A9C1954A5C5007DD14C - 6003F593195388D20070C39A - 6003F5B5195388D20070C39A - 6003F58C195388D20070C39A - 6003F58B195388D20070C39A - CCE77F10C6D41F74B075ECD0 - - isa - PBXGroup - sourceTree - <group> - - 6003F582195388D10070C39A - - attributes - - CLASSPREFIX - SWG - LastUpgradeCheck - 0510 - ORGANIZATIONNAME - geekerzp - - buildConfigurationList - 6003F585195388D10070C39A - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - Base - - mainGroup - 6003F581195388D10070C39A - productRefGroup - 6003F58B195388D20070C39A - projectDirPath - - projectReferences - - projectRoot - - targets - - 6003F589195388D20070C39A - 6003F5AD195388D20070C39A - - - 6003F585195388D10070C39A - - buildConfigurations - - 6003F5BD195388D20070C39A - 6003F5BE195388D20070C39A - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 6003F586195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F59E195388D20070C39A - 6003F5A7195388D20070C39A - 6003F59A195388D20070C39A - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F587195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F590195388D20070C39A - 6003F592195388D20070C39A - 6003F58E195388D20070C39A - 94BE6BE84795B5034A811E61 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F588195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F598195388D20070C39A - B2ADC17C287DCABF329BA8AC - B2ADC2D632658A5F73C6CE66 - B2ADC56977372855A63F4E4D - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F589195388D20070C39A - - buildConfigurationList - 6003F5BF195388D20070C39A - buildPhases - - 799E7E29D924C30424DFBA28 - 6003F586195388D20070C39A - 6003F587195388D20070C39A - 6003F588195388D20070C39A - 429AF5C69E165ED75311B4B0 - 183E54C09C54DAEB54B2546F - FF3F107CF27E0A54D86C49F5 - - buildRules - - dependencies - - isa - PBXNativeTarget - name - SwaggerClient_Example - productName - SwaggerClient - productReference - 6003F58A195388D20070C39A - productType - com.apple.product-type.application - - 6003F58A195388D20070C39A - - explicitFileType - wrapper.application - includeInIndex - 0 - isa - PBXFileReference - path - SwaggerClient_Example.app - sourceTree - BUILT_PRODUCTS_DIR - - 6003F58B195388D20070C39A - - children - - 6003F58A195388D20070C39A - 6003F5AE195388D20070C39A - B2ADC084A2C0BDF217832B03 - - isa - PBXGroup - name - Products - sourceTree - <group> - - 6003F58C195388D20070C39A - - children - - 6003F58D195388D20070C39A - 6003F58F195388D20070C39A - 6003F591195388D20070C39A - 6003F5AF195388D20070C39A - 8D46325ECAD48245C07F6733 - FDEF5BA3CF9CFFDEB5A47DB4 - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 6003F58D195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - Foundation.framework - path - System/Library/Frameworks/Foundation.framework - sourceTree - SDKROOT - - 6003F58E195388D20070C39A - - fileRef - 6003F58D195388D20070C39A - isa - PBXBuildFile - - 6003F58F195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreGraphics.framework - path - System/Library/Frameworks/CoreGraphics.framework - sourceTree - SDKROOT - - 6003F590195388D20070C39A - - fileRef - 6003F58F195388D20070C39A - isa - PBXBuildFile - - 6003F591195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - UIKit.framework - path - System/Library/Frameworks/UIKit.framework - sourceTree - SDKROOT - - 6003F592195388D20070C39A - - fileRef - 6003F591195388D20070C39A - isa - PBXBuildFile - - 6003F593195388D20070C39A - - children - - 6003F59C195388D20070C39A - 6003F59D195388D20070C39A - 6003F5A5195388D20070C39A - 6003F5A6195388D20070C39A - 6003F594195388D20070C39A - - isa - PBXGroup - name - Example for SwaggerClient - path - SwaggerClient - sourceTree - <group> - - 6003F594195388D20070C39A - - children - - 6003F595195388D20070C39A - 6003F596195388D20070C39A - 6003F599195388D20070C39A - 6003F59B195388D20070C39A - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 6003F595195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - SwaggerClient-Info.plist - sourceTree - <group> - - 6003F596195388D20070C39A - - children - - 6003F597195388D20070C39A - - isa - PBXVariantGroup - name - InfoPlist.strings - sourceTree - <group> - - 6003F597195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - text.plist.strings - name - en - path - en.lproj/InfoPlist.strings - sourceTree - <group> - - 6003F598195388D20070C39A - - fileRef - 6003F596195388D20070C39A - isa - PBXBuildFile - - 6003F599195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - main.m - sourceTree - <group> - - 6003F59A195388D20070C39A - - fileRef - 6003F599195388D20070C39A - isa - PBXBuildFile - - 6003F59B195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SwaggerClient-Prefix.pch - sourceTree - <group> - - 6003F59C195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SWGAppDelegate.h - sourceTree - <group> - - 6003F59D195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SWGAppDelegate.m - sourceTree - <group> - - 6003F59E195388D20070C39A - - fileRef - 6003F59D195388D20070C39A - isa - PBXBuildFile - - 6003F5A5195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SWGViewController.h - sourceTree - <group> - - 6003F5A6195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SWGViewController.m - sourceTree - <group> - - 6003F5A7195388D20070C39A - - fileRef - 6003F5A6195388D20070C39A - isa - PBXBuildFile - - 6003F5AA195388D20070C39A - - buildActionMask - 2147483647 - files - - B2ADC3C7634D15595DD14814 - B2ADC0B1C8A60A05C48B4DF7 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F5AB195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F5B0195388D20070C39A - 6003F5B2195388D20070C39A - 6003F5B1195388D20070C39A - 158CE3AA214CB1B31C7ADC48 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F5AC195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F5BA195388D20070C39A - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F5AD195388D20070C39A - - buildConfigurationList - 6003F5C2195388D20070C39A - buildPhases - - 7B069562A9F91E498732474F - 6003F5AA195388D20070C39A - 6003F5AB195388D20070C39A - 6003F5AC195388D20070C39A - E337D7E459CCFFDF27046FFC - 111D7956304BD6E860AA8709 - AA7CAD658C61D6EBA222B5F8 - - buildRules - - dependencies - - 6003F5B4195388D20070C39A - - isa - PBXNativeTarget - name - SwaggerClient_Tests - productName - SwaggerClientTests - productReference - 6003F5AE195388D20070C39A - productType - com.apple.product-type.bundle.unit-test - - 6003F5AE195388D20070C39A - - explicitFileType - wrapper.cfbundle - includeInIndex - 0 - isa - PBXFileReference - path - SwaggerClient_Tests.xctest - sourceTree - BUILT_PRODUCTS_DIR - - 6003F5AF195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - XCTest.framework - path - Library/Frameworks/XCTest.framework - sourceTree - DEVELOPER_DIR - - 6003F5B0195388D20070C39A - - fileRef - 6003F5AF195388D20070C39A - isa - PBXBuildFile - - 6003F5B1195388D20070C39A - - fileRef - 6003F58D195388D20070C39A - isa - PBXBuildFile - - 6003F5B2195388D20070C39A - - fileRef - 6003F591195388D20070C39A - isa - PBXBuildFile - - 6003F5B3195388D20070C39A - - containerPortal - 6003F582195388D10070C39A - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 6003F589195388D20070C39A - remoteInfo - SwaggerClient - - 6003F5B4195388D20070C39A - - isa - PBXTargetDependency - target - 6003F589195388D20070C39A - targetProxy - 6003F5B3195388D20070C39A - - 6003F5B5195388D20070C39A - - children - - 6003F5B6195388D20070C39A - B2ADC838FCC22F4BC6C41106 - B2ADCA62DE4AC0F5BAB42208 - - isa - PBXGroup - path - Tests - sourceTree - <group> - - 6003F5B6195388D20070C39A - - children - - 6003F5B7195388D20070C39A - 6003F5B8195388D20070C39A - 606FC2411953D9B200FFA9A0 - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 6003F5B7195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Tests-Info.plist - sourceTree - <group> - - 6003F5B8195388D20070C39A - - children - - 6003F5B9195388D20070C39A - - isa - PBXVariantGroup - name - InfoPlist.strings - sourceTree - <group> - - 6003F5B9195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - text.plist.strings - name - en - path - en.lproj/InfoPlist.strings - sourceTree - <group> - - 6003F5BA195388D20070C39A - - fileRef - 6003F5B8195388D20070C39A - isa - PBXBuildFile - - 6003F5BD195388D20070C39A - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - COPY_PHASE_STRIP - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - 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 - 7.1 - ONLY_ACTIVE_ARCH - YES - SDKROOT - iphoneos - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Debug - - 6003F5BE195388D20070C39A - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - COPY_PHASE_STRIP - YES - ENABLE_NS_ASSERTIONS - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - 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 - 7.1 - SDKROOT - iphoneos - TARGETED_DEVICE_FAMILY - 1,2 - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - 6003F5BF195388D20070C39A - - buildConfigurations - - 6003F5C0195388D20070C39A - 6003F5C1195388D20070C39A - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 6003F5C0195388D20070C39A - - baseConfigurationReference - E445A633FA767F207D7EE6CE - buildSettings - - ASSETCATALOG_COMPILER_APPICON_NAME - AppIcon - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME - LaunchImage - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - SwaggerClient/SwaggerClient-Prefix.pch - INFOPLIST_FILE - SwaggerClient/SwaggerClient-Info.plist - MODULE_NAME - ExampleApp - PRODUCT_NAME - $(TARGET_NAME) - WRAPPER_EXTENSION - app - - isa - XCBuildConfiguration - name - Debug - - 6003F5C1195388D20070C39A - - baseConfigurationReference - BFB4BE760737508B3CFC23B2 - buildSettings - - ASSETCATALOG_COMPILER_APPICON_NAME - AppIcon - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME - LaunchImage - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - SwaggerClient/SwaggerClient-Prefix.pch - INFOPLIST_FILE - SwaggerClient/SwaggerClient-Info.plist - MODULE_NAME - ExampleApp - PRODUCT_NAME - $(TARGET_NAME) - WRAPPER_EXTENSION - app - - isa - XCBuildConfiguration - name - Release - - 6003F5C2195388D20070C39A - - buildConfigurations - - 6003F5C3195388D20070C39A - 6003F5C4195388D20070C39A - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 6003F5C3195388D20070C39A - - baseConfigurationReference - 73CCD82196AABD64F2807C7B - buildSettings - - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - $(DEVELOPER_FRAMEWORKS_DIR) - - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Tests/Tests-Prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - INFOPLIST_FILE - Tests/Tests-Info.plist - PRODUCT_NAME - $(TARGET_NAME) - WRAPPER_EXTENSION - xctest - - isa - XCBuildConfiguration - name - Debug - - 6003F5C4195388D20070C39A - - baseConfigurationReference - 1A81C3BE3E54961CD827EAE3 - buildSettings - - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - $(DEVELOPER_FRAMEWORKS_DIR) - - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Tests/Tests-Prefix.pch - INFOPLIST_FILE - Tests/Tests-Info.plist - PRODUCT_NAME - $(TARGET_NAME) - WRAPPER_EXTENSION - xctest - - isa - XCBuildConfiguration - name - Release - - 606FC2411953D9B200FFA9A0 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Tests-Prefix.pch - sourceTree - <group> - - 60FF7A9C1954A5C5007DD14C - - children - - E9675D953C6DCDE71A1BDFD4 - 4CCE21315897B7D544C83242 - B2ADC7027D4B025ABCA7999F - B2ADC65E342ADA697322D68C - - isa - PBXGroup - name - Podspec Metadata - sourceTree - <group> - - 73CCD82196AABD64F2807C7B - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-SwaggerClient_Tests.debug.xcconfig - path - Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig - sourceTree - <group> - - 799E7E29D924C30424DFBA28 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Check Pods Manifest.lock - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null -if [[ $? != 0 ]] ; then - cat << EOM -error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. -EOM - exit 1 -fi - - showEnvVarsInLog - 0 - - 7B069562A9F91E498732474F - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Check Pods Manifest.lock - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null -if [[ $? != 0 ]] ; then - cat << EOM -error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. -EOM - exit 1 -fi - - showEnvVarsInLog - 0 - - 8D46325ECAD48245C07F6733 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-SwaggerClient_Example.a - sourceTree - BUILT_PRODUCTS_DIR - - 94BE6BE84795B5034A811E61 - - fileRef - 8D46325ECAD48245C07F6733 - isa - PBXBuildFile - - AA7CAD658C61D6EBA222B5F8 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh" - - showEnvVarsInLog - 0 - - B2ADC084A2C0BDF217832B03 - - isa - PBXFileReference - lastKnownFileType - file.storyboard - name - Launch Screen.storyboard - path - SwaggerClient/Launch Screen.storyboard - sourceTree - <group> - - B2ADC0B1C8A60A05C48B4DF7 - - fileRef - B2ADC55130D5E329ED945E8F - isa - PBXBuildFile - - B2ADC17C287DCABF329BA8AC - - fileRef - B2ADC7027D4B025ABCA7999F - isa - PBXBuildFile - - B2ADC2D632658A5F73C6CE66 - - fileRef - B2ADC65E342ADA697322D68C - isa - PBXBuildFile - - B2ADC2F3483B3117A00FA91C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - DatabaseHelper.h - sourceTree - <group> - - B2ADC3C7634D15595DD14814 - - fileRef - B2ADC838FCC22F4BC6C41106 - isa - PBXBuildFile - - B2ADC55130D5E329ED945E8F - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - DatabaseHelper.m - sourceTree - <group> - - B2ADC56977372855A63F4E4D - - fileRef - B2ADC084A2C0BDF217832B03 - isa - PBXBuildFile - - B2ADC65E342ADA697322D68C - - isa - PBXFileReference - lastKnownFileType - folder.assetcatalog - name - Images.xcassets - path - SwaggerClient/Images.xcassets - sourceTree - <group> - - B2ADC7027D4B025ABCA7999F - - isa - PBXFileReference - lastKnownFileType - file.storyboard - name - Main.storyboard - path - SwaggerClient/Main.storyboard - sourceTree - <group> - - B2ADC838FCC22F4BC6C41106 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - BuildersTest.m - sourceTree - <group> - - B2ADCA62DE4AC0F5BAB42208 - - children - - B2ADC2F3483B3117A00FA91C - B2ADC55130D5E329ED945E8F - - isa - PBXGroup - path - Helpers - sourceTree - <group> - - BFB4BE760737508B3CFC23B2 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-SwaggerClient_Example.release.xcconfig - path - Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig - sourceTree - <group> - - CCE77F10C6D41F74B075ECD0 - - children - - E445A633FA767F207D7EE6CE - BFB4BE760737508B3CFC23B2 - 73CCD82196AABD64F2807C7B - 1A81C3BE3E54961CD827EAE3 - - isa - PBXGroup - name - Pods - sourceTree - <group> - - E337D7E459CCFFDF27046FFC - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Copy Pods Resources - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh" - - showEnvVarsInLog - 0 - - E445A633FA767F207D7EE6CE - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-SwaggerClient_Example.debug.xcconfig - path - Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig - sourceTree - <group> - - E9675D953C6DCDE71A1BDFD4 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text - name - SwaggerClient.podspec - path - ../SwaggerClient.podspec - sourceTree - <group> - - FDEF5BA3CF9CFFDEB5A47DB4 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-SwaggerClient_Tests.a - sourceTree - BUILT_PRODUCTS_DIR - - FF3F107CF27E0A54D86C49F5 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh" - - showEnvVarsInLog - 0 - - - rootObject - 6003F582195388D10070C39A - - +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */; }; + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; + 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; + 6003F59E195388D20070C39A /* SWGAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* SWGAppDelegate.m */; }; + 6003F5A7195388D20070C39A /* SWGViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* SWGViewController.m */; }; + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; + 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */; }; + B2ADC0B1C8A60A05C48B4DF7 /* DatabaseHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */; }; + B2ADC17C287DCABF329BA8AC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC7027D4B025ABCA7999F /* Main.storyboard */; }; + B2ADC2D632658A5F73C6CE66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC65E342ADA697322D68C /* Images.xcassets */; }; + B2ADC3C7634D15595DD14814 /* BuildersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = B2ADC838FCC22F4BC6C41106 /* BuildersTest.m */; }; + B2ADC56977372855A63F4E4D /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6003F582195388D10070C39A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6003F589195388D20070C39A; + remoteInfo = SwaggerClient; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig"; sourceTree = ""; }; + 4CCE21315897B7D544C83242 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + 6003F58A195388D20070C39A /* SwaggerClient_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 6003F595195388D20070C39A /* SwaggerClient-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SwaggerClient-Info.plist"; sourceTree = ""; }; + 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 6003F59B195388D20070C39A /* SwaggerClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwaggerClient-Prefix.pch"; sourceTree = ""; }; + 6003F59C195388D20070C39A /* SWGAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWGAppDelegate.h; sourceTree = ""; }; + 6003F59D195388D20070C39A /* SWGAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SWGAppDelegate.m; sourceTree = ""; }; + 6003F5A5195388D20070C39A /* SWGViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWGViewController.h; sourceTree = ""; }; + 6003F5A6195388D20070C39A /* SWGViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SWGViewController.m; sourceTree = ""; }; + 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClient_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; + 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; + 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig"; sourceTree = ""; }; + 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "SwaggerClient/Launch Screen.storyboard"; sourceTree = ""; }; + B2ADC2F3483B3117A00FA91C /* DatabaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseHelper.h; sourceTree = ""; }; + B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatabaseHelper.m; sourceTree = ""; }; + B2ADC65E342ADA697322D68C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SwaggerClient/Images.xcassets; sourceTree = ""; }; + B2ADC7027D4B025ABCA7999F /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Main.storyboard; path = SwaggerClient/Main.storyboard; sourceTree = ""; }; + B2ADC838FCC22F4BC6C41106 /* BuildersTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuildersTest.m; sourceTree = ""; }; + BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig"; sourceTree = ""; }; + E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig"; sourceTree = ""; }; + E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwaggerClient.podspec; path = ../SwaggerClient.podspec; sourceTree = ""; }; + FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6003F587195388D20070C39A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, + 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6003F5AB195388D20070C39A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, + 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 6003F581195388D10070C39A = { + isa = PBXGroup; + children = ( + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, + 6003F593195388D20070C39A /* Example for SwaggerClient */, + 6003F5B5195388D20070C39A /* Tests */, + 6003F58C195388D20070C39A /* Frameworks */, + 6003F58B195388D20070C39A /* Products */, + CCE77F10C6D41F74B075ECD0 /* Pods */, + ); + sourceTree = ""; + }; + 6003F58B195388D20070C39A /* Products */ = { + isa = PBXGroup; + children = ( + 6003F58A195388D20070C39A /* SwaggerClient_Example.app */, + 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */, + B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */, + ); + name = Products; + sourceTree = ""; + }; + 6003F58C195388D20070C39A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6003F58D195388D20070C39A /* Foundation.framework */, + 6003F58F195388D20070C39A /* CoreGraphics.framework */, + 6003F591195388D20070C39A /* UIKit.framework */, + 6003F5AF195388D20070C39A /* XCTest.framework */, + 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */, + FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6003F593195388D20070C39A /* Example for SwaggerClient */ = { + isa = PBXGroup; + children = ( + 6003F59C195388D20070C39A /* SWGAppDelegate.h */, + 6003F59D195388D20070C39A /* SWGAppDelegate.m */, + 6003F5A5195388D20070C39A /* SWGViewController.h */, + 6003F5A6195388D20070C39A /* SWGViewController.m */, + 6003F594195388D20070C39A /* Supporting Files */, + ); + name = "Example for SwaggerClient"; + path = SwaggerClient; + sourceTree = ""; + }; + 6003F594195388D20070C39A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 6003F595195388D20070C39A /* SwaggerClient-Info.plist */, + 6003F596195388D20070C39A /* InfoPlist.strings */, + 6003F599195388D20070C39A /* main.m */, + 6003F59B195388D20070C39A /* SwaggerClient-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 6003F5B5195388D20070C39A /* Tests */ = { + isa = PBXGroup; + children = ( + 6003F5B6195388D20070C39A /* Supporting Files */, + B2ADC838FCC22F4BC6C41106 /* BuildersTest.m */, + B2ADCA62DE4AC0F5BAB42208 /* Helpers */, + ); + path = Tests; + sourceTree = ""; + }; + 6003F5B6195388D20070C39A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 6003F5B7195388D20070C39A /* Tests-Info.plist */, + 6003F5B8195388D20070C39A /* InfoPlist.strings */, + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { + isa = PBXGroup; + children = ( + E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */, + 4CCE21315897B7D544C83242 /* README.md */, + B2ADC7027D4B025ABCA7999F /* Main.storyboard */, + B2ADC65E342ADA697322D68C /* Images.xcassets */, + ); + name = "Podspec Metadata"; + sourceTree = ""; + }; + B2ADCA62DE4AC0F5BAB42208 /* Helpers */ = { + isa = PBXGroup; + children = ( + B2ADC2F3483B3117A00FA91C /* DatabaseHelper.h */, + B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */, + ); + path = Helpers; + sourceTree = ""; + }; + CCE77F10C6D41F74B075ECD0 /* Pods */ = { + isa = PBXGroup; + children = ( + E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */, + BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */, + 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */, + 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6003F589195388D20070C39A /* SwaggerClient_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */; + buildPhases = ( + 799E7E29D924C30424DFBA28 /* [CP] Check Pods Manifest.lock */, + 6003F586195388D20070C39A /* Sources */, + 6003F587195388D20070C39A /* Frameworks */, + 6003F588195388D20070C39A /* Resources */, + 429AF5C69E165ED75311B4B0 /* [CP] Copy Pods Resources */, + 183E54C09C54DAEB54B2546F /* [CP] Embed Pods Frameworks */, + FF3F107CF27E0A54D86C49F5 /* Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwaggerClient_Example; + productName = SwaggerClient; + productReference = 6003F58A195388D20070C39A /* SwaggerClient_Example.app */; + productType = "com.apple.product-type.application"; + }; + 6003F5AD195388D20070C39A /* SwaggerClient_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */; + buildPhases = ( + 7B069562A9F91E498732474F /* [CP] Check Pods Manifest.lock */, + 6003F5AA195388D20070C39A /* Sources */, + 6003F5AB195388D20070C39A /* Frameworks */, + 6003F5AC195388D20070C39A /* Resources */, + E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */, + 111D7956304BD6E860AA8709 /* [CP] Embed Pods Frameworks */, + AA7CAD658C61D6EBA222B5F8 /* Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 6003F5B4195388D20070C39A /* PBXTargetDependency */, + ); + name = SwaggerClient_Tests; + productName = SwaggerClientTests; + productReference = 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6003F582195388D10070C39A /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = SWG; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = geekerzp; + }; + buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6003F581195388D10070C39A; + productRefGroup = 6003F58B195388D20070C39A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6003F589195388D20070C39A /* SwaggerClient_Example */, + 6003F5AD195388D20070C39A /* SwaggerClient_Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6003F588195388D20070C39A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, + B2ADC17C287DCABF329BA8AC /* Main.storyboard in Resources */, + B2ADC2D632658A5F73C6CE66 /* Images.xcassets in Resources */, + B2ADC56977372855A63F4E4D /* Launch Screen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6003F5AC195388D20070C39A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 111D7956304BD6E860AA8709 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 183E54C09C54DAEB54B2546F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 429AF5C69E165ED75311B4B0 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 799E7E29D924C30424DFBA28 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 7B069562A9F91E498732474F /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + AA7CAD658C61D6EBA222B5F8 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + FF3F107CF27E0A54D86C49F5 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6003F586195388D20070C39A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F59E195388D20070C39A /* SWGAppDelegate.m in Sources */, + 6003F5A7195388D20070C39A /* SWGViewController.m in Sources */, + 6003F59A195388D20070C39A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6003F5AA195388D20070C39A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B2ADC3C7634D15595DD14814 /* BuildersTest.m in Sources */, + B2ADC0B1C8A60A05C48B4DF7 /* DatabaseHelper.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6003F589195388D20070C39A /* SwaggerClient_Example */; + targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 6003F596195388D20070C39A /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 6003F597195388D20070C39A /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 6003F5B9195388D20070C39A /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 6003F5BD195388D20070C39A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + 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 = 7.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 6003F5BE195388D20070C39A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 7.1; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6003F5C0195388D20070C39A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "SwaggerClient/SwaggerClient-Prefix.pch"; + INFOPLIST_FILE = "SwaggerClient/SwaggerClient-Info.plist"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 6003F5C1195388D20070C39A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "SwaggerClient/SwaggerClient-Prefix.pch"; + INFOPLIST_FILE = "SwaggerClient/SwaggerClient-Info.plist"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 6003F5C3195388D20070C39A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "Tests/Tests-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + 6003F5C4195388D20070C39A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; + INFOPLIST_FILE = "Tests/Tests-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6003F5BD195388D20070C39A /* Debug */, + 6003F5BE195388D20070C39A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6003F5C0195388D20070C39A /* Debug */, + 6003F5C1195388D20070C39A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6003F5C3195388D20070C39A /* Debug */, + 6003F5C4195388D20070C39A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6003F582195388D10070C39A /* Project object */; +} diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/All Tests.xcscheme b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/All Tests.xcscheme index 5c68411bb2d..24c1ef20c79 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/All Tests.xcscheme +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/All Tests.xcscheme @@ -1,11 +1,17 @@ - + + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> - + + + + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + + + + + + + + + + + + diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient-Example.xcscheme b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient-Example.xcscheme index d34e508f438..29c43710dff 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient-Example.xcscheme +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient-Example.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -48,15 +48,18 @@ ReferencedContainer = "container:SwaggerClient.xcodeproj"> + + @@ -72,10 +75,10 @@ diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient/SwaggerClient-Info.plist b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient/SwaggerClient-Info.plist index e21b2835ad7..0c641d12c14 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient/SwaggerClient-Info.plist +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient/SwaggerClient-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/Tests/Tests-Info.plist b/samples/client/petstore/objc/core-data/SwaggerClientTests/Tests/Tests-Info.plist index 41520eda89e..169b6f710ec 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/Tests/Tests-Info.plist +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/Tests/Tests-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/samples/client/petstore/objc/default/README.md b/samples/client/petstore/objc/default/README.md index 3bf3052f514..b066c97b038 100644 --- a/samples/client/petstore/objc/default/README.md +++ b/samples/client/petstore/objc/default/README.md @@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi - API version: 1.0.0 - Package version: -- Build date: 2016-08-04T12:24:22.869+02:00 +- Build date: 2016-08-17T10:06:57.326+02:00 - Build package: class io.swagger.codegen.languages.ObjcClientCodegen ## Requirements diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m index 5551bffae9a..0034dd69fc5 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m @@ -1,11 +1,12 @@ #import "SWGPetApi.h" #import "SWGQueryParamCollection.h" +#import "SWGApiClient.h" #import "SWGPet.h" @interface SWGPetApi () -@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders; @end @@ -27,7 +28,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; self = [super init]; if (self) { _apiClient = apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; } return self; } @@ -35,15 +36,15 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; #pragma mark - -(NSString*) defaultHeaderForKey:(NSString*)key { - return self.defaultHeaders[key]; -} - --(void) addHeader:(NSString*)value forKey:(NSString*)key { - [self setDefaultHeaderValue:value forKey:key]; + return self.mutableDefaultHeaders[key]; } -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key { - [self.defaultHeaders setValue:value forKey:key]; + [self.mutableDefaultHeaders setValue:value forKey:key]; +} + +-(NSDictionary *)defaultHeaders { + return self.mutableDefaultHeaders; } #pragma mark - Api Methods diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m index a275c1f0568..2a17173f83a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m @@ -1,11 +1,12 @@ #import "SWGStoreApi.h" #import "SWGQueryParamCollection.h" +#import "SWGApiClient.h" #import "SWGOrder.h" @interface SWGStoreApi () -@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders; @end @@ -27,7 +28,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; self = [super init]; if (self) { _apiClient = apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; } return self; } @@ -35,15 +36,15 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; #pragma mark - -(NSString*) defaultHeaderForKey:(NSString*)key { - return self.defaultHeaders[key]; -} - --(void) addHeader:(NSString*)value forKey:(NSString*)key { - [self setDefaultHeaderValue:value forKey:key]; + return self.mutableDefaultHeaders[key]; } -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key { - [self.defaultHeaders setValue:value forKey:key]; + [self.mutableDefaultHeaders setValue:value forKey:key]; +} + +-(NSDictionary *)defaultHeaders { + return self.mutableDefaultHeaders; } #pragma mark - Api Methods diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m index 58e1729f490..e1acf3af007 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m @@ -1,11 +1,12 @@ #import "SWGUserApi.h" #import "SWGQueryParamCollection.h" +#import "SWGApiClient.h" #import "SWGUser.h" @interface SWGUserApi () -@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders; +@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders; @end @@ -27,7 +28,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; self = [super init]; if (self) { _apiClient = apiClient; - _defaultHeaders = [NSMutableDictionary dictionary]; + _mutableDefaultHeaders = [NSMutableDictionary dictionary]; } return self; } @@ -35,15 +36,15 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; #pragma mark - -(NSString*) defaultHeaderForKey:(NSString*)key { - return self.defaultHeaders[key]; -} - --(void) addHeader:(NSString*)value forKey:(NSString*)key { - [self setDefaultHeaderValue:value forKey:key]; + return self.mutableDefaultHeaders[key]; } -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key { - [self.defaultHeaders setValue:value forKey:key]; + [self.mutableDefaultHeaders setValue:value forKey:key]; +} + +-(NSDictionary *)defaultHeaders { + return self.mutableDefaultHeaders; } #pragma mark - Api Methods diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h index c02d289a336..23af90b6117 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h @@ -1,6 +1,6 @@ #import -#import "SWGObject.h" -#import "SWGApiClient.h" + +@class SWGApiClient; /** * Swagger Petstore @@ -32,9 +32,9 @@ -(instancetype) initWithApiClient:(SWGApiClient *)apiClient; --(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:"); - -(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key; -(NSString*) defaultHeaderForKey:(NSString*)key; +-(NSDictionary *)defaultHeaders; + @end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m index d4758d36b03..e29f3a8f55f 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m @@ -1,5 +1,6 @@ #import +#import "SWGLogger.h" #import "SWGApiClient.h" #import "SWGJSONRequestSerializer.h" #import "SWGJSONResponseSerializer.h" @@ -62,24 +63,18 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { #pragma mark - Initialize Methods - (instancetype)init { - return [self initWithConfiguration:[SWGDefaultConfiguration sharedConfig]]; } - (instancetype)initWithBaseURL:(NSURL *)url { - - return [self initWithBaseURL:url - configuration:[SWGDefaultConfiguration sharedConfig]]; - + return [self initWithBaseURL:url configuration:[SWGDefaultConfiguration sharedConfig]]; } - (instancetype)initWithConfiguration:(id)configuration { - return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration]; } -- (instancetype)initWithBaseURL:(NSURL *)url - configuration:(id)configuration { +- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id)configuration { self = [super initWithBaseURL:url]; if (self) { diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h index a85a47d4bc8..864d87d2535 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h @@ -1,5 +1,6 @@ #import -#import "SWGLogger.h" + +@class SWGLogger; /** * Swagger Petstore @@ -25,6 +26,8 @@ * limitations under the License. */ +static NSString * const kSWGAPIVersion = @"1.0.0"; + @protocol SWGConfiguration /** diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h index cd44d30e551..48cedd5d558 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -25,6 +25,8 @@ * limitations under the License. */ +@class SWGApiClient; + @interface SWGDefaultConfiguration : NSObject diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m index cd37ae35859..225d24155eb 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m @@ -1,5 +1,6 @@ #import "SWGDefaultConfiguration.h" #import "SWGBasicAuthTokenProvider.h" +#import "SWGLogger.h" @interface SWGDefaultConfiguration () diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj index d2cacf84e6e..1cf9ba5a2c3 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -1,1570 +1,682 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 111D7956304BD6E860AA8709 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh" - - showEnvVarsInLog - 0 - - 158CE3AA214CB1B31C7ADC48 - - fileRef - FDEF5BA3CF9CFFDEB5A47DB4 - isa - PBXBuildFile - - 183E54C09C54DAEB54B2546F - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh" - - showEnvVarsInLog - 0 - - 1A81C3BE3E54961CD827EAE3 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-SwaggerClient_Tests.release.xcconfig - path - Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig - sourceTree - <group> - - 429AF5C69E165ED75311B4B0 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Copy Pods Resources - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh" - - showEnvVarsInLog - 0 - - 4CCE21315897B7D544C83242 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - net.daringfireball.markdown - name - README.md - path - ../README.md - sourceTree - <group> - - 6003F581195388D10070C39A - - children - - 60FF7A9C1954A5C5007DD14C - 6003F593195388D20070C39A - 6003F5B5195388D20070C39A - 6003F58C195388D20070C39A - 6003F58B195388D20070C39A - CCE77F10C6D41F74B075ECD0 - - isa - PBXGroup - sourceTree - <group> - - 6003F582195388D10070C39A - - attributes - - CLASSPREFIX - SWG - LastUpgradeCheck - 0510 - ORGANIZATIONNAME - geekerzp - - buildConfigurationList - 6003F585195388D10070C39A - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - Base - - mainGroup - 6003F581195388D10070C39A - productRefGroup - 6003F58B195388D20070C39A - projectDirPath - - projectReferences - - projectRoot - - targets - - 6003F589195388D20070C39A - 6003F5AD195388D20070C39A - - - 6003F585195388D10070C39A - - buildConfigurations - - 6003F5BD195388D20070C39A - 6003F5BE195388D20070C39A - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 6003F586195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F59E195388D20070C39A - 6003F5A7195388D20070C39A - 6003F59A195388D20070C39A - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F587195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F590195388D20070C39A - 6003F592195388D20070C39A - 6003F58E195388D20070C39A - 94BE6BE84795B5034A811E61 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F588195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F598195388D20070C39A - B2ADC17C287DCABF329BA8AC - B2ADC2D632658A5F73C6CE66 - B2ADC56977372855A63F4E4D - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F589195388D20070C39A - - buildConfigurationList - 6003F5BF195388D20070C39A - buildPhases - - 799E7E29D924C30424DFBA28 - 6003F586195388D20070C39A - 6003F587195388D20070C39A - 6003F588195388D20070C39A - 429AF5C69E165ED75311B4B0 - 183E54C09C54DAEB54B2546F - DA8DD6AAE903F2CD38F2D9D5 - - buildRules - - dependencies - - isa - PBXNativeTarget - name - SwaggerClient_Example - productName - SwaggerClient - productReference - 6003F58A195388D20070C39A - productType - com.apple.product-type.application - - 6003F58A195388D20070C39A - - explicitFileType - wrapper.application - includeInIndex - 0 - isa - PBXFileReference - path - SwaggerClient_Example.app - sourceTree - BUILT_PRODUCTS_DIR - - 6003F58B195388D20070C39A - - children - - 6003F58A195388D20070C39A - 6003F5AE195388D20070C39A - B2ADC084A2C0BDF217832B03 - - isa - PBXGroup - name - Products - sourceTree - <group> - - 6003F58C195388D20070C39A - - children - - 6003F58D195388D20070C39A - 6003F58F195388D20070C39A - 6003F591195388D20070C39A - 6003F5AF195388D20070C39A - 8D46325ECAD48245C07F6733 - FDEF5BA3CF9CFFDEB5A47DB4 - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 6003F58D195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - Foundation.framework - path - System/Library/Frameworks/Foundation.framework - sourceTree - SDKROOT - - 6003F58E195388D20070C39A - - fileRef - 6003F58D195388D20070C39A - isa - PBXBuildFile - - 6003F58F195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreGraphics.framework - path - System/Library/Frameworks/CoreGraphics.framework - sourceTree - SDKROOT - - 6003F590195388D20070C39A - - fileRef - 6003F58F195388D20070C39A - isa - PBXBuildFile - - 6003F591195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - UIKit.framework - path - System/Library/Frameworks/UIKit.framework - sourceTree - SDKROOT - - 6003F592195388D20070C39A - - fileRef - 6003F591195388D20070C39A - isa - PBXBuildFile - - 6003F593195388D20070C39A - - children - - 6003F59C195388D20070C39A - 6003F59D195388D20070C39A - 6003F5A5195388D20070C39A - 6003F5A6195388D20070C39A - 6003F594195388D20070C39A - - isa - PBXGroup - name - Example for SwaggerClient - path - SwaggerClient - sourceTree - <group> - - 6003F594195388D20070C39A - - children - - 6003F595195388D20070C39A - 6003F596195388D20070C39A - 6003F599195388D20070C39A - 6003F59B195388D20070C39A - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 6003F595195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - SwaggerClient-Info.plist - sourceTree - <group> - - 6003F596195388D20070C39A - - children - - 6003F597195388D20070C39A - - isa - PBXVariantGroup - name - InfoPlist.strings - sourceTree - <group> - - 6003F597195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - text.plist.strings - name - en - path - en.lproj/InfoPlist.strings - sourceTree - <group> - - 6003F598195388D20070C39A - - fileRef - 6003F596195388D20070C39A - isa - PBXBuildFile - - 6003F599195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - main.m - sourceTree - <group> - - 6003F59A195388D20070C39A - - fileRef - 6003F599195388D20070C39A - isa - PBXBuildFile - - 6003F59B195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SwaggerClient-Prefix.pch - sourceTree - <group> - - 6003F59C195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SWGAppDelegate.h - sourceTree - <group> - - 6003F59D195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SWGAppDelegate.m - sourceTree - <group> - - 6003F59E195388D20070C39A - - fileRef - 6003F59D195388D20070C39A - isa - PBXBuildFile - - 6003F5A5195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SWGViewController.h - sourceTree - <group> - - 6003F5A6195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SWGViewController.m - sourceTree - <group> - - 6003F5A7195388D20070C39A - - fileRef - 6003F5A6195388D20070C39A - isa - PBXBuildFile - - 6003F5AA195388D20070C39A - - buildActionMask - 2147483647 - files - - CFDFB4141B3CFFF6009739C5 - CF0ADB481B5F95D6008A2729 - CFDFB4131B3CFFDD009739C5 - 6003F5BC195388D20070C39A - CFDFB4151B3D000B009739C5 - CFDFB4121B3CFFA8009739C5 - CF8F71391B5F73AC00162980 - B2ADC0B1C8A60A05C48B4DF7 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F5AB195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F5B0195388D20070C39A - 6003F5B2195388D20070C39A - 6003F5B1195388D20070C39A - 158CE3AA214CB1B31C7ADC48 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F5AC195388D20070C39A - - buildActionMask - 2147483647 - files - - 6003F5BA195388D20070C39A - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 6003F5AD195388D20070C39A - - buildConfigurationList - 6003F5C2195388D20070C39A - buildPhases - - 7B069562A9F91E498732474F - 6003F5AA195388D20070C39A - 6003F5AB195388D20070C39A - 6003F5AC195388D20070C39A - E337D7E459CCFFDF27046FFC - 111D7956304BD6E860AA8709 - FD42985CC653969FE997DEC9 - - buildRules - - dependencies - - 6003F5B4195388D20070C39A - - isa - PBXNativeTarget - name - SwaggerClient_Tests - productName - SwaggerClientTests - productReference - 6003F5AE195388D20070C39A - productType - com.apple.product-type.bundle.unit-test - - 6003F5AE195388D20070C39A - - explicitFileType - wrapper.cfbundle - includeInIndex - 0 - isa - PBXFileReference - path - SwaggerClient_Tests.xctest - sourceTree - BUILT_PRODUCTS_DIR - - 6003F5AF195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - XCTest.framework - path - Library/Frameworks/XCTest.framework - sourceTree - DEVELOPER_DIR - - 6003F5B0195388D20070C39A - - fileRef - 6003F5AF195388D20070C39A - isa - PBXBuildFile - - 6003F5B1195388D20070C39A - - fileRef - 6003F58D195388D20070C39A - isa - PBXBuildFile - - 6003F5B2195388D20070C39A - - fileRef - 6003F591195388D20070C39A - isa - PBXBuildFile - - 6003F5B3195388D20070C39A - - containerPortal - 6003F582195388D10070C39A - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 6003F589195388D20070C39A - remoteInfo - SwaggerClient - - 6003F5B4195388D20070C39A - - isa - PBXTargetDependency - target - 6003F589195388D20070C39A - targetProxy - 6003F5B3195388D20070C39A - - 6003F5B5195388D20070C39A - - children - - CFDFB40A1B3CFEC3009739C5 - CFDFB40B1B3CFEC3009739C5 - CFDFB40C1B3CFEC3009739C5 - CF0ADB471B5F95D6008A2729 - CF8F71381B5F73AC00162980 - CFDFB40D1B3CFEC3009739C5 - 6003F5BB195388D20070C39A - 6003F5B6195388D20070C39A - B2ADCA62DE4AC0F5BAB42208 - - isa - PBXGroup - path - Tests - sourceTree - <group> - - 6003F5B6195388D20070C39A - - children - - 6003F5B7195388D20070C39A - 6003F5B8195388D20070C39A - 606FC2411953D9B200FFA9A0 - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 6003F5B7195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Tests-Info.plist - sourceTree - <group> - - 6003F5B8195388D20070C39A - - children - - 6003F5B9195388D20070C39A - - isa - PBXVariantGroup - name - InfoPlist.strings - sourceTree - <group> - - 6003F5B9195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - text.plist.strings - name - en - path - en.lproj/InfoPlist.strings - sourceTree - <group> - - 6003F5BA195388D20070C39A - - fileRef - 6003F5B8195388D20070C39A - isa - PBXBuildFile - - 6003F5BB195388D20070C39A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Tests.m - sourceTree - <group> - - 6003F5BC195388D20070C39A - - fileRef - 6003F5BB195388D20070C39A - isa - PBXBuildFile - - 6003F5BD195388D20070C39A - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - COPY_PHASE_STRIP - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - 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 - 7.1 - ONLY_ACTIVE_ARCH - YES - SDKROOT - iphoneos - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Debug - - 6003F5BE195388D20070C39A - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - COPY_PHASE_STRIP - YES - ENABLE_NS_ASSERTIONS - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - 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 - 7.1 - SDKROOT - iphoneos - TARGETED_DEVICE_FAMILY - 1,2 - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - 6003F5BF195388D20070C39A - - buildConfigurations - - 6003F5C0195388D20070C39A - 6003F5C1195388D20070C39A - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 6003F5C0195388D20070C39A - - baseConfigurationReference - E445A633FA767F207D7EE6CE - buildSettings - - ASSETCATALOG_COMPILER_APPICON_NAME - AppIcon - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME - LaunchImage - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - SwaggerClient/SwaggerClient-Prefix.pch - INFOPLIST_FILE - SwaggerClient/SwaggerClient-Info.plist - MODULE_NAME - ExampleApp - PRODUCT_NAME - $(TARGET_NAME) - WRAPPER_EXTENSION - app - - isa - XCBuildConfiguration - name - Debug - - 6003F5C1195388D20070C39A - - baseConfigurationReference - BFB4BE760737508B3CFC23B2 - buildSettings - - ASSETCATALOG_COMPILER_APPICON_NAME - AppIcon - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME - LaunchImage - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - SwaggerClient/SwaggerClient-Prefix.pch - INFOPLIST_FILE - SwaggerClient/SwaggerClient-Info.plist - MODULE_NAME - ExampleApp - PRODUCT_NAME - $(TARGET_NAME) - WRAPPER_EXTENSION - app - - isa - XCBuildConfiguration - name - Release - - 6003F5C2195388D20070C39A - - buildConfigurations - - 6003F5C3195388D20070C39A - 6003F5C4195388D20070C39A - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 6003F5C3195388D20070C39A - - baseConfigurationReference - 73CCD82196AABD64F2807C7B - buildSettings - - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - $(DEVELOPER_FRAMEWORKS_DIR) - - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Tests/Tests-Prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - INFOPLIST_FILE - Tests/Tests-Info.plist - PRODUCT_NAME - $(TARGET_NAME) - WRAPPER_EXTENSION - xctest - - isa - XCBuildConfiguration - name - Debug - - 6003F5C4195388D20070C39A - - baseConfigurationReference - 1A81C3BE3E54961CD827EAE3 - buildSettings - - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - $(DEVELOPER_FRAMEWORKS_DIR) - - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Tests/Tests-Prefix.pch - INFOPLIST_FILE - Tests/Tests-Info.plist - PRODUCT_NAME - $(TARGET_NAME) - WRAPPER_EXTENSION - xctest - - isa - XCBuildConfiguration - name - Release - - 606FC2411953D9B200FFA9A0 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Tests-Prefix.pch - sourceTree - <group> - - 60FF7A9C1954A5C5007DD14C - - children - - E9675D953C6DCDE71A1BDFD4 - 4CCE21315897B7D544C83242 - B2ADC7027D4B025ABCA7999F - B2ADC65E342ADA697322D68C - - isa - PBXGroup - name - Podspec Metadata - sourceTree - <group> - - 73CCD82196AABD64F2807C7B - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-SwaggerClient_Tests.debug.xcconfig - path - Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig - sourceTree - <group> - - 799E7E29D924C30424DFBA28 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Check Pods Manifest.lock - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null -if [[ $? != 0 ]] ; then - cat << EOM -error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. -EOM - exit 1 -fi - - showEnvVarsInLog - 0 - - 7B069562A9F91E498732474F - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Check Pods Manifest.lock - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null -if [[ $? != 0 ]] ; then - cat << EOM -error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. -EOM - exit 1 -fi - - showEnvVarsInLog - 0 - - 8D46325ECAD48245C07F6733 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-SwaggerClient_Example.a - sourceTree - BUILT_PRODUCTS_DIR - - 94BE6BE84795B5034A811E61 - - fileRef - 8D46325ECAD48245C07F6733 - isa - PBXBuildFile - - B2ADC084A2C0BDF217832B03 - - isa - PBXFileReference - lastKnownFileType - file.storyboard - name - Launch Screen.storyboard - path - SwaggerClient/Launch Screen.storyboard - sourceTree - <group> - - B2ADC0B1C8A60A05C48B4DF7 - - fileRef - B2ADC55130D5E329ED945E8F - isa - PBXBuildFile - - B2ADC17C287DCABF329BA8AC - - fileRef - B2ADC7027D4B025ABCA7999F - isa - PBXBuildFile - - B2ADC2D632658A5F73C6CE66 - - fileRef - B2ADC65E342ADA697322D68C - isa - PBXBuildFile - - B2ADC2F3483B3117A00FA91C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - DatabaseHelper.h - sourceTree - <group> - - B2ADC55130D5E329ED945E8F - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - DatabaseHelper.m - sourceTree - <group> - - B2ADC56977372855A63F4E4D - - fileRef - B2ADC084A2C0BDF217832B03 - isa - PBXBuildFile - - B2ADC65E342ADA697322D68C - - isa - PBXFileReference - lastKnownFileType - folder.assetcatalog - name - Images.xcassets - path - SwaggerClient/Images.xcassets - sourceTree - <group> - - B2ADC7027D4B025ABCA7999F - - isa - PBXFileReference - lastKnownFileType - file.storyboard - name - Main.storyboard - path - SwaggerClient/Main.storyboard - sourceTree - <group> - - B2ADCA62DE4AC0F5BAB42208 - - children - - B2ADC2F3483B3117A00FA91C - B2ADC55130D5E329ED945E8F - - isa - PBXGroup - path - Helpers - sourceTree - <group> - - BFB4BE760737508B3CFC23B2 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-SwaggerClient_Example.release.xcconfig - path - Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig - sourceTree - <group> - - CCE77F10C6D41F74B075ECD0 - - children - - E445A633FA767F207D7EE6CE - BFB4BE760737508B3CFC23B2 - 73CCD82196AABD64F2807C7B - 1A81C3BE3E54961CD827EAE3 - - isa - PBXGroup - name - Pods - sourceTree - <group> - - CF0ADB471B5F95D6008A2729 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - PetTest.m - sourceTree - <group> - - CF0ADB481B5F95D6008A2729 - - fileRef - CF0ADB471B5F95D6008A2729 - isa - PBXBuildFile - - CF8F71381B5F73AC00162980 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - DeserializationTest.m - sourceTree - <group> - - CF8F71391B5F73AC00162980 - - fileRef - CF8F71381B5F73AC00162980 - isa - PBXBuildFile - - CFDFB40A1B3CFEC3009739C5 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - PetApiTest.m - sourceTree - <group> - - CFDFB40B1B3CFEC3009739C5 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - StoreApiTest.m - sourceTree - <group> - - CFDFB40C1B3CFEC3009739C5 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SWGApiClientTest.m - sourceTree - <group> - - CFDFB40D1B3CFEC3009739C5 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - UserApiTest.m - sourceTree - <group> - - CFDFB4121B3CFFA8009739C5 - - fileRef - CFDFB40D1B3CFEC3009739C5 - isa - PBXBuildFile - - CFDFB4131B3CFFDD009739C5 - - fileRef - CFDFB40A1B3CFEC3009739C5 - isa - PBXBuildFile - - CFDFB4141B3CFFF6009739C5 - - fileRef - CFDFB40B1B3CFEC3009739C5 - isa - PBXBuildFile - - CFDFB4151B3D000B009739C5 - - fileRef - CFDFB40C1B3CFEC3009739C5 - isa - PBXBuildFile - - DA8DD6AAE903F2CD38F2D9D5 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh" - - showEnvVarsInLog - 0 - - E337D7E459CCFFDF27046FFC - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - 📦 Copy Pods Resources - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh" - - showEnvVarsInLog - 0 - - E445A633FA767F207D7EE6CE - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-SwaggerClient_Example.debug.xcconfig - path - Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig - sourceTree - <group> - - E9675D953C6DCDE71A1BDFD4 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text - name - SwaggerClient.podspec - path - ../SwaggerClient.podspec - sourceTree - <group> - - FD42985CC653969FE997DEC9 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh" - - showEnvVarsInLog - 0 - - FDEF5BA3CF9CFFDEB5A47DB4 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-SwaggerClient_Tests.a - sourceTree - BUILT_PRODUCTS_DIR - - - rootObject - 6003F582195388D10070C39A - - +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */; }; + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; + 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; + 6003F59E195388D20070C39A /* SWGAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* SWGAppDelegate.m */; }; + 6003F5A7195388D20070C39A /* SWGViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* SWGViewController.m */; }; + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; + 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; + 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */; }; + B2ADC0B1C8A60A05C48B4DF7 /* DatabaseHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */; }; + B2ADC17C287DCABF329BA8AC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC7027D4B025ABCA7999F /* Main.storyboard */; }; + B2ADC2D632658A5F73C6CE66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC65E342ADA697322D68C /* Images.xcassets */; }; + B2ADC56977372855A63F4E4D /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */; }; + CF0ADB481B5F95D6008A2729 /* PetTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF0ADB471B5F95D6008A2729 /* PetTest.m */; }; + CF8F71391B5F73AC00162980 /* DeserializationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF8F71381B5F73AC00162980 /* DeserializationTest.m */; }; + CFDFB4121B3CFFA8009739C5 /* UserApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */; }; + CFDFB4131B3CFFDD009739C5 /* PetApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */; }; + CFDFB4141B3CFFF6009739C5 /* StoreApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */; }; + CFDFB4151B3D000B009739C5 /* SWGApiClientTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40C1B3CFEC3009739C5 /* SWGApiClientTest.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6003F582195388D10070C39A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6003F589195388D20070C39A; + remoteInfo = SwaggerClient; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig"; sourceTree = ""; }; + 4CCE21315897B7D544C83242 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + 6003F58A195388D20070C39A /* SwaggerClient_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 6003F595195388D20070C39A /* SwaggerClient-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SwaggerClient-Info.plist"; sourceTree = ""; }; + 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 6003F59B195388D20070C39A /* SwaggerClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwaggerClient-Prefix.pch"; sourceTree = ""; }; + 6003F59C195388D20070C39A /* SWGAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWGAppDelegate.h; sourceTree = ""; }; + 6003F59D195388D20070C39A /* SWGAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SWGAppDelegate.m; sourceTree = ""; }; + 6003F5A5195388D20070C39A /* SWGViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWGViewController.h; sourceTree = ""; }; + 6003F5A6195388D20070C39A /* SWGViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SWGViewController.m; sourceTree = ""; }; + 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClient_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; + 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; + 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig"; sourceTree = ""; }; + 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "SwaggerClient/Launch Screen.storyboard"; sourceTree = ""; }; + B2ADC2F3483B3117A00FA91C /* DatabaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseHelper.h; sourceTree = ""; }; + B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatabaseHelper.m; sourceTree = ""; }; + B2ADC65E342ADA697322D68C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SwaggerClient/Images.xcassets; sourceTree = ""; }; + B2ADC7027D4B025ABCA7999F /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Main.storyboard; path = SwaggerClient/Main.storyboard; sourceTree = ""; }; + BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig"; sourceTree = ""; }; + CF0ADB471B5F95D6008A2729 /* PetTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PetTest.m; sourceTree = ""; }; + CF8F71381B5F73AC00162980 /* DeserializationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeserializationTest.m; sourceTree = ""; }; + CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PetApiTest.m; sourceTree = ""; }; + CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StoreApiTest.m; sourceTree = ""; }; + CFDFB40C1B3CFEC3009739C5 /* SWGApiClientTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGApiClientTest.m; sourceTree = ""; }; + CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserApiTest.m; sourceTree = ""; }; + E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig"; sourceTree = ""; }; + E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwaggerClient.podspec; path = ../SwaggerClient.podspec; sourceTree = ""; }; + FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6003F587195388D20070C39A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, + 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6003F5AB195388D20070C39A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, + 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 6003F581195388D10070C39A = { + isa = PBXGroup; + children = ( + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, + 6003F593195388D20070C39A /* Example for SwaggerClient */, + 6003F5B5195388D20070C39A /* Tests */, + 6003F58C195388D20070C39A /* Frameworks */, + 6003F58B195388D20070C39A /* Products */, + CCE77F10C6D41F74B075ECD0 /* Pods */, + ); + sourceTree = ""; + }; + 6003F58B195388D20070C39A /* Products */ = { + isa = PBXGroup; + children = ( + 6003F58A195388D20070C39A /* SwaggerClient_Example.app */, + 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */, + B2ADC084A2C0BDF217832B03 /* Launch Screen.storyboard */, + ); + name = Products; + sourceTree = ""; + }; + 6003F58C195388D20070C39A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6003F58D195388D20070C39A /* Foundation.framework */, + 6003F58F195388D20070C39A /* CoreGraphics.framework */, + 6003F591195388D20070C39A /* UIKit.framework */, + 6003F5AF195388D20070C39A /* XCTest.framework */, + 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */, + FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6003F593195388D20070C39A /* Example for SwaggerClient */ = { + isa = PBXGroup; + children = ( + 6003F59C195388D20070C39A /* SWGAppDelegate.h */, + 6003F59D195388D20070C39A /* SWGAppDelegate.m */, + 6003F5A5195388D20070C39A /* SWGViewController.h */, + 6003F5A6195388D20070C39A /* SWGViewController.m */, + 6003F594195388D20070C39A /* Supporting Files */, + ); + name = "Example for SwaggerClient"; + path = SwaggerClient; + sourceTree = ""; + }; + 6003F594195388D20070C39A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 6003F595195388D20070C39A /* SwaggerClient-Info.plist */, + 6003F596195388D20070C39A /* InfoPlist.strings */, + 6003F599195388D20070C39A /* main.m */, + 6003F59B195388D20070C39A /* SwaggerClient-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 6003F5B5195388D20070C39A /* Tests */ = { + isa = PBXGroup; + children = ( + CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */, + CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */, + CFDFB40C1B3CFEC3009739C5 /* SWGApiClientTest.m */, + CF0ADB471B5F95D6008A2729 /* PetTest.m */, + CF8F71381B5F73AC00162980 /* DeserializationTest.m */, + CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */, + 6003F5BB195388D20070C39A /* Tests.m */, + 6003F5B6195388D20070C39A /* Supporting Files */, + B2ADCA62DE4AC0F5BAB42208 /* Helpers */, + ); + path = Tests; + sourceTree = ""; + }; + 6003F5B6195388D20070C39A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 6003F5B7195388D20070C39A /* Tests-Info.plist */, + 6003F5B8195388D20070C39A /* InfoPlist.strings */, + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { + isa = PBXGroup; + children = ( + E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */, + 4CCE21315897B7D544C83242 /* README.md */, + B2ADC7027D4B025ABCA7999F /* Main.storyboard */, + B2ADC65E342ADA697322D68C /* Images.xcassets */, + ); + name = "Podspec Metadata"; + sourceTree = ""; + }; + B2ADCA62DE4AC0F5BAB42208 /* Helpers */ = { + isa = PBXGroup; + children = ( + B2ADC2F3483B3117A00FA91C /* DatabaseHelper.h */, + B2ADC55130D5E329ED945E8F /* DatabaseHelper.m */, + ); + path = Helpers; + sourceTree = ""; + }; + CCE77F10C6D41F74B075ECD0 /* Pods */ = { + isa = PBXGroup; + children = ( + E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */, + BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */, + 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */, + 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6003F589195388D20070C39A /* SwaggerClient_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */; + buildPhases = ( + 799E7E29D924C30424DFBA28 /* [CP] Check Pods Manifest.lock */, + 6003F586195388D20070C39A /* Sources */, + 6003F587195388D20070C39A /* Frameworks */, + 6003F588195388D20070C39A /* Resources */, + 429AF5C69E165ED75311B4B0 /* [CP] Copy Pods Resources */, + 183E54C09C54DAEB54B2546F /* [CP] Embed Pods Frameworks */, + DA8DD6AAE903F2CD38F2D9D5 /* Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwaggerClient_Example; + productName = SwaggerClient; + productReference = 6003F58A195388D20070C39A /* SwaggerClient_Example.app */; + productType = "com.apple.product-type.application"; + }; + 6003F5AD195388D20070C39A /* SwaggerClient_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */; + buildPhases = ( + 7B069562A9F91E498732474F /* [CP] Check Pods Manifest.lock */, + 6003F5AA195388D20070C39A /* Sources */, + 6003F5AB195388D20070C39A /* Frameworks */, + 6003F5AC195388D20070C39A /* Resources */, + E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */, + 111D7956304BD6E860AA8709 /* [CP] Embed Pods Frameworks */, + FD42985CC653969FE997DEC9 /* Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 6003F5B4195388D20070C39A /* PBXTargetDependency */, + ); + name = SwaggerClient_Tests; + productName = SwaggerClientTests; + productReference = 6003F5AE195388D20070C39A /* SwaggerClient_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6003F582195388D10070C39A /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = SWG; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = geekerzp; + }; + buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6003F581195388D10070C39A; + productRefGroup = 6003F58B195388D20070C39A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6003F589195388D20070C39A /* SwaggerClient_Example */, + 6003F5AD195388D20070C39A /* SwaggerClient_Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6003F588195388D20070C39A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, + B2ADC17C287DCABF329BA8AC /* Main.storyboard in Resources */, + B2ADC2D632658A5F73C6CE66 /* Images.xcassets in Resources */, + B2ADC56977372855A63F4E4D /* Launch Screen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6003F5AC195388D20070C39A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 111D7956304BD6E860AA8709 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 183E54C09C54DAEB54B2546F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 429AF5C69E165ED75311B4B0 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 799E7E29D924C30424DFBA28 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 7B069562A9F91E498732474F /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + DA8DD6AAE903F2CD38F2D9D5 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + FD42985CC653969FE997DEC9 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6003F586195388D20070C39A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6003F59E195388D20070C39A /* SWGAppDelegate.m in Sources */, + 6003F5A7195388D20070C39A /* SWGViewController.m in Sources */, + 6003F59A195388D20070C39A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6003F5AA195388D20070C39A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CFDFB4141B3CFFF6009739C5 /* StoreApiTest.m in Sources */, + CF0ADB481B5F95D6008A2729 /* PetTest.m in Sources */, + CFDFB4131B3CFFDD009739C5 /* PetApiTest.m in Sources */, + 6003F5BC195388D20070C39A /* Tests.m in Sources */, + CFDFB4151B3D000B009739C5 /* SWGApiClientTest.m in Sources */, + CFDFB4121B3CFFA8009739C5 /* UserApiTest.m in Sources */, + CF8F71391B5F73AC00162980 /* DeserializationTest.m in Sources */, + B2ADC0B1C8A60A05C48B4DF7 /* DatabaseHelper.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6003F589195388D20070C39A /* SwaggerClient_Example */; + targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 6003F596195388D20070C39A /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 6003F597195388D20070C39A /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 6003F5B9195388D20070C39A /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 6003F5BD195388D20070C39A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + 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 = 7.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 6003F5BE195388D20070C39A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 7.1; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6003F5C0195388D20070C39A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "SwaggerClient/SwaggerClient-Prefix.pch"; + INFOPLIST_FILE = "SwaggerClient/SwaggerClient-Info.plist"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 6003F5C1195388D20070C39A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "SwaggerClient/SwaggerClient-Prefix.pch"; + INFOPLIST_FILE = "SwaggerClient/SwaggerClient-Info.plist"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 6003F5C3195388D20070C39A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "Tests/Tests-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + 6003F5C4195388D20070C39A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; + INFOPLIST_FILE = "Tests/Tests-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6003F5BD195388D20070C39A /* Debug */, + 6003F5BE195388D20070C39A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6003F5C0195388D20070C39A /* Debug */, + 6003F5C1195388D20070C39A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6003F5C3195388D20070C39A /* Debug */, + 6003F5C4195388D20070C39A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6003F582195388D10070C39A /* Project object */; +} diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/All Tests.xcscheme b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/All Tests.xcscheme index 5c68411bb2d..24c1ef20c79 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/All Tests.xcscheme +++ b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/All Tests.xcscheme @@ -1,11 +1,17 @@ - + + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> - + + + + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + + + + + + + + + + + + diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient-Example.xcscheme b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient-Example.xcscheme index d34e508f438..29c43710dff 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient-Example.xcscheme +++ b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient-Example.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -48,15 +48,18 @@ ReferencedContainer = "container:SwaggerClient.xcodeproj"> + + @@ -72,10 +75,10 @@ diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient/SwaggerClient-Info.plist b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient/SwaggerClient-Info.plist index e21b2835ad7..0c641d12c14 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient/SwaggerClient-Info.plist +++ b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient/SwaggerClient-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/Tests/Tests-Info.plist b/samples/client/petstore/objc/default/SwaggerClientTests/Tests/Tests-Info.plist index 41520eda89e..169b6f710ec 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/Tests/Tests-Info.plist +++ b/samples/client/petstore/objc/default/SwaggerClientTests/Tests/Tests-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType From e40f9abdbb8a6d0c0cc00cb13d5204da369dd7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Mac=CC=81kowiak?= Date: Tue, 23 Aug 2016 14:12:58 +0200 Subject: [PATCH 003/182] Fix problem with multitheard api client --- .../codegen/languages/ObjcClientCodegen.java | 4 +- .../resources/objc/ApiClient-body.mustache | 236 +++++------------- .../resources/objc/ApiClient-header.mustache | 80 +----- .../objc/DefaultConfiguration-body.mustache | 4 +- .../objc/JSONResponseSerializer-body.mustache | 39 --- .../JSONResponseSerializer-header.mustache | 8 - .../main/resources/objc/Logger-body.mustache | 3 +- .../objc/ResponseDeserializer-body.mustache | 42 +++- .../resources/objc/Sanitizer-body.mustache | 10 +- .../resources/objc/Sanitizer-header.mustache | 2 + .../client/petstore/objc/core-data/README.md | 2 +- .../SwaggerClient/Core/SWGApiClient.h | 80 +----- .../SwaggerClient/Core/SWGApiClient.m | 236 +++++------------- .../Core/SWGDefaultConfiguration.m | 4 +- .../core-data/SwaggerClient/Core/SWGLogger.m | 3 +- .../Core/SWGResponseDeserializer.m | 42 +++- .../SwaggerClient/Core/SWGSanitizer.h | 2 + .../SwaggerClient/Core/SWGSanitizer.m | 10 +- .../client/petstore/objc/default/README.md | 2 +- .../default/SwaggerClient/Core/SWGApiClient.h | 80 +----- .../default/SwaggerClient/Core/SWGApiClient.m | 236 +++++------------- .../Core/SWGDefaultConfiguration.m | 4 +- .../Core/SWGJSONResponseSerializer.h | 30 --- .../Core/SWGJSONResponseSerializer.m | 39 --- .../default/SwaggerClient/Core/SWGLogger.m | 3 +- .../Core/SWGResponseDeserializer.m | 42 +++- .../default/SwaggerClient/Core/SWGSanitizer.h | 2 + .../default/SwaggerClient/Core/SWGSanitizer.m | 10 +- .../Tests/DeserializationTest.m | 12 + .../SwaggerClientTests/Tests/UserApiTest.m | 9 +- 30 files changed, 343 insertions(+), 933 deletions(-) delete mode 100644 modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-body.mustache delete mode 100644 modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-header.mustache delete mode 100644 samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.h delete mode 100644 samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.m diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java index a9d827fd1a5..d1d9056a9ee 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java @@ -246,9 +246,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("QueryParamCollection-header.mustache", coreFileFolder(), classPrefix + "QueryParamCollection.h")); supportingFiles.add(new SupportingFile("QueryParamCollection-body.mustache", coreFileFolder(), classPrefix + "QueryParamCollection.m")); supportingFiles.add(new SupportingFile("ApiClient-header.mustache", coreFileFolder(), classPrefix + "ApiClient.h")); - supportingFiles.add(new SupportingFile("ApiClient-body.mustache", coreFileFolder(), classPrefix + "ApiClient.m")); - supportingFiles.add(new SupportingFile("JSONResponseSerializer-header.mustache", coreFileFolder(), classPrefix + "JSONResponseSerializer.h")); - supportingFiles.add(new SupportingFile("JSONResponseSerializer-body.mustache", coreFileFolder(), classPrefix + "JSONResponseSerializer.m")); + supportingFiles.add(new SupportingFile("ApiClient-body.mustache", coreFileFolder(), classPrefix + "ApiClient.m")); supportingFiles.add(new SupportingFile("JSONRequestSerializer-body.mustache", coreFileFolder(), classPrefix + "JSONRequestSerializer.m")); supportingFiles.add(new SupportingFile("JSONRequestSerializer-header.mustache", coreFileFolder(), classPrefix + "JSONRequestSerializer.h")); supportingFiles.add(new SupportingFile("ResponseDeserializer-body.mustache", coreFileFolder(), classPrefix + "ResponseDeserializer.m")); diff --git a/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache b/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache index 2c52f2058e3..7e56be1491b 100644 --- a/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/ApiClient-body.mustache @@ -1,21 +1,13 @@ -#import #import "{{classPrefix}}Logger.h" #import "{{classPrefix}}ApiClient.h" #import "{{classPrefix}}JSONRequestSerializer.h" -#import "{{classPrefix}}JSONResponseSerializer.h" #import "{{classPrefix}}QueryParamCollection.h" #import "{{classPrefix}}DefaultConfiguration.h" - - NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}ResponseObject"; -static bool offlineState = false; -static bool cacheEnabled = false; -static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable; -static void (^reachabilityChangeBlock)(int); - +static NSString * const k{{classPrefix}}ContentDispositionKey = @"Content-Disposition"; static NSDictionary * {{classPrefix}}__headerFieldsForResponse(NSURLResponse *response) { if(![response isKindOfClass:[NSHTTPURLResponse class]]) { @@ -26,17 +18,13 @@ static NSDictionary * {{classPrefix}}__headerFieldsForResponse(NSURLResponse *re static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) { NSDictionary * headers = {{classPrefix}}__headerFieldsForResponse(response); - if(!headers[@"Content-Disposition"]) { + if(!headers[k{{classPrefix}}ContentDispositionKey]) { return [NSString stringWithFormat:@"%@", [[NSProcessInfo processInfo] globallyUniqueString]]; } NSString *pattern = @"filename=['\"]?([^'\"\\s]+)['\"]?"; - NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:pattern - options:NSRegularExpressionCaseInsensitive - error:nil]; - NSString *contentDispositionHeader = headers[@"Content-Disposition"]; - NSTextCheckingResult *match = [regexp firstMatchInString:contentDispositionHeader - options:0 - range:NSMakeRange(0, [contentDispositionHeader length])]; + NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:nil]; + NSString *contentDispositionHeader = headers[k{{classPrefix}}ContentDispositionKey]; + NSTextCheckingResult *match = [regexp firstMatchInString:contentDispositionHeader options:0 range:NSMakeRange(0, [contentDispositionHeader length])]; return [contentDispositionHeader substringWithRange:[match rangeAtIndex:1]]; } @@ -45,6 +33,8 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) @property (nonatomic, strong, readwrite) id<{{classPrefix}}Configuration> configuration; +@property (nonatomic, strong) NSArray* downloadTaskResponseTypes; + @end @implementation {{classPrefix}}ApiClient @@ -75,7 +65,6 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) } - (instancetype)initWithBaseURL:(NSURL *)url configuration:(id<{{classPrefix}}Configuration>)configuration { - self = [super initWithBaseURL:url]; if (self) { _configuration = configuration; @@ -83,102 +72,30 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) _responseDeserializer = [[{{classPrefix}}ResponseDeserializer alloc] init]; _sanitizer = [[{{classPrefix}}Sanitizer alloc] init]; - self.requestSerializer = [AFJSONRequestSerializer serializer]; - self.responseSerializer = [AFJSONResponseSerializer serializer]; - self.securityPolicy = [self customSecurityPolicy]; + _downloadTaskResponseTypes = @[@"NSURL*", @"NSURL"]; - // configure reachability - [self configureCacheReachibility]; + AFHTTPRequestSerializer* afhttpRequestSerializer = [AFHTTPRequestSerializer serializer]; + SWGJSONRequestSerializer * swgjsonRequestSerializer = [SWGJSONRequestSerializer serializer]; + _requestSerializerForContentType = @{kSWGApplicationJSONType : swgjsonRequestSerializer, + @"application/x-www-form-urlencoded": afhttpRequestSerializer, + @"multipart/form-data": afhttpRequestSerializer + }; + self.securityPolicy = [self createSecurityPolicy]; + self.responseSerializer = [AFHTTPResponseSerializer serializer]; } - return self; } -#pragma mark - Setter Methods - -+ (void) setOfflineState:(BOOL) state { - offlineState = state; -} - -+ (void) setCacheEnabled:(BOOL)enabled { - cacheEnabled = enabled; -} - -+(void) setReachabilityStatus:(AFNetworkReachabilityStatus)status { - reachabilityStatus = status; -} - -- (void)setHeaderValue:(NSString*) value forKey:(NSString*) forKey { - [self.requestSerializer setValue:value forHTTPHeaderField:forKey]; -} - -- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { - [super setRequestSerializer:requestSerializer]; - requestSerializer.timeoutInterval = self.timeoutInterval; -} - -#pragma mark - Cache Methods - -+(void)clearCache { - [[NSURLCache sharedURLCache] removeAllCachedResponses]; -} - -+(void)configureCacheWithMemoryAndDiskCapacity: (unsigned long) memorySize - diskSize: (unsigned long) diskSize { - NSAssert(memorySize > 0, @"invalid in-memory cache size"); - NSAssert(diskSize >= 0, @"invalid disk cache size"); - - NSURLCache *cache = - [[NSURLCache alloc] - initWithMemoryCapacity:memorySize - diskCapacity:diskSize - diskPath:@"swagger_url_cache"]; - - [NSURLCache setSharedURLCache:cache]; -} - -#pragma mark - Reachability Methods - -+(AFNetworkReachabilityStatus) getReachabilityStatus { - return reachabilityStatus; -} - -+(BOOL) getOfflineState { - return offlineState; -} - -+(void) setReachabilityChangeBlock:(void(^)(int))changeBlock { - reachabilityChangeBlock = changeBlock; -} - -- (void) configureCacheReachibility { - [self.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { - reachabilityStatus = status; - {{classPrefix}}DebugLog(@"reachability changed to %@",AFStringFromNetworkReachabilityStatus(status)); - [{{classPrefix}}ApiClient setOfflineState:status == AFNetworkReachabilityStatusUnknown || status == AFNetworkReachabilityStatusNotReachable]; - - // call the reachability block, if configured - if (reachabilityChangeBlock != nil) { - reachabilityChangeBlock(status); - } - }]; - - [self.reachabilityManager startMonitoring]; -} - #pragma mark - Task Methods -- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request - completionBlock: (void (^)(id, NSError *))completionBlock { +- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock { NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { {{classPrefix}}DebugLogResponse(response, responseObject,request,error); - if(!error) { completionBlock(responseObject, nil); return; } - NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { // Add in the (parsed) response body. @@ -191,10 +108,9 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) return task; } -- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request - completionBlock: (void (^)(id, NSError *))completionBlock { - - id<{{classPrefix}}Configuration> config = self.configuration; +- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock { + + __block NSString * tempFolderPath = [self.configuration.tempFolderPath copy]; NSURLSessionDataTask* task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { {{classPrefix}}DebugLogResponse(response, responseObject,request,error); @@ -206,9 +122,10 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) } NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); + return; } - NSString *directory = config.tempFolderPath ?: NSTemporaryDirectory(); + NSString *directory = tempFolderPath ?: NSTemporaryDirectory(); NSString *filename = {{classPrefix}}__fileNameForResponse(response); NSString *filepath = [directory stringByAppendingPathComponent:filename]; @@ -238,35 +155,17 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) responseType: (NSString *) responseType completionBlock: (void (^)(id, NSError *))completionBlock { - // setting request serializer - if ([requestContentType isEqualToString:@"application/json"]) { - self.requestSerializer = [{{classPrefix}}JSONRequestSerializer serializer]; - } - else if ([requestContentType isEqualToString:@"application/x-www-form-urlencoded"]) { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - } - else if ([requestContentType isEqualToString:@"multipart/form-data"]) { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - } - else { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - NSAssert(NO, @"Unsupported request type %@", requestContentType); - } + AFHTTPRequestSerializer * requestSerializer = [self requestSerializerForRequestContentType:requestContentType]; - // setting response serializer - if ([responseContentType isEqualToString:@"application/json"]) { - self.responseSerializer = [{{classPrefix}}JSONResponseSerializer serializer]; - } else { - self.responseSerializer = [AFHTTPResponseSerializer serializer]; - } + __weak id sanitizer = self.sanitizer; // sanitize parameters - pathParams = [self.sanitizer sanitizeForSerialization:pathParams]; - queryParams = [self.sanitizer sanitizeForSerialization:queryParams]; - headerParams = [self.sanitizer sanitizeForSerialization:headerParams]; - formParams = [self.sanitizer sanitizeForSerialization:formParams]; + pathParams = [sanitizer sanitizeForSerialization:pathParams]; + queryParams = [sanitizer sanitizeForSerialization:queryParams]; + headerParams = [sanitizer sanitizeForSerialization:headerParams]; + formParams = [sanitizer sanitizeForSerialization:formParams]; if(![body isKindOfClass:[NSData class]]) { - body = [self.sanitizer sanitizeForSerialization:body]; + body = [sanitizer sanitizeForSerialization:body]; } // auth setting @@ -279,22 +178,19 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) [resourcePath replaceCharactersInRange:[resourcePath rangeOfString:[NSString stringWithFormat:@"{%@}", key]] withString:safeString]; }]; - NSMutableURLRequest * request = nil; - NSString* pathWithQueryParams = [self pathWithQueryParamsToString:resourcePath queryParams:queryParams]; if ([pathWithQueryParams hasPrefix:@"/"]) { pathWithQueryParams = [pathWithQueryParams substringFromIndex:1]; } NSString* urlString = [[NSURL URLWithString:pathWithQueryParams relativeToURL:self.baseURL] absoluteString]; + + NSError *requestCreateError = nil; + NSMutableURLRequest * request = nil; if (files.count > 0) { - __weak __typeof(self)weakSelf = self; - request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" - URLString:urlString - parameters:nil - constructingBodyWithBlock:^(id formData) { + request = [requestSerializer multipartFormRequestWithMethod:@"POST" URLString:urlString parameters:nil constructingBodyWithBlock:^(id formData) { [formParams enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { - NSString *objString = [weakSelf.sanitizer parameterToString:obj]; + NSString *objString = [sanitizer parameterToString:obj]; NSData *data = [objString dataUsingEncoding:NSUTF8StringEncoding]; [formData appendPartWithFormData:data name:key]; }]; @@ -302,59 +198,43 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) NSURL *filePath = (NSURL *)obj; [formData appendPartWithFileURL:filePath name:key error:nil]; }]; - } error:nil]; + } error:&requestCreateError]; } else { if (formParams) { - request = [self.requestSerializer requestWithMethod:method - URLString:urlString - parameters:formParams - error:nil]; + request = [requestSerializer requestWithMethod:method URLString:urlString parameters:formParams error:&requestCreateError]; } if (body) { - request = [self.requestSerializer requestWithMethod:method - URLString:urlString - parameters:body - error:nil]; + request = [requestSerializer requestWithMethod:method URLString:urlString parameters:body error:&requestCreateError]; } } - - // request cache - BOOL hasHeaderParams = [headerParams count] > 0; - if (offlineState) { - {{classPrefix}}DebugLog(@"%@ cache forced", resourcePath); - [request setCachePolicy:NSURLRequestReturnCacheDataDontLoad]; - } - else if(!hasHeaderParams && [method isEqualToString:@"GET"] && cacheEnabled) { - {{classPrefix}}DebugLog(@"%@ cache enabled", resourcePath); - [request setCachePolicy:NSURLRequestUseProtocolCachePolicy]; - } - else { - {{classPrefix}}DebugLog(@"%@ cache disabled", resourcePath); - [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; + if(!request) { + completionBlock(nil, requestCreateError); + return nil; } - if (hasHeaderParams){ + if ([headerParams count] > 0){ for(NSString * key in [headerParams keyEnumerator]){ [request setValue:[headerParams valueForKey:key] forHTTPHeaderField:key]; } } - [self.requestSerializer setValue:responseContentType forHTTPHeaderField:@"Accept"]; + [requestSerializer setValue:responseContentType forHTTPHeaderField:@"Accept"]; [self postProcessRequest:request]; NSURLSessionTask *task = nil; - if ([responseType isEqualToString:@"NSURL*"] || [responseType isEqualToString:@"NSURL"]) { + if ([self.downloadTaskResponseTypes containsObject:responseType]) { task = [self downloadTaskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { completionBlock(data, error); }]; - } - else { + } else { + __weak typeof(self) weakSelf = self; task = [self taskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { NSError * serializationError; - id response = [self.responseDeserializer deserialize:data class:responseType error:&serializationError]; + id response = [weakSelf.responseDeserializer deserialize:data class:responseType error:&serializationError]; + if(!response && !error){ error = serializationError; } @@ -367,16 +247,24 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) return task; } +-(AFHTTPRequestSerializer *)requestSerializerForRequestContentType:(NSString *)requestContentType { + AFHTTPRequestSerializer * serializer = self.requestSerializerForContentType[requestContentType]; + if(!serializer) { + NSAssert(NO, @"Unsupported request content type %@", requestContentType); + serializer = [AFHTTPRequestSerializer serializer]; + } + serializer.timeoutInterval = self.timeoutInterval; + return serializer; +} + //Added for easier override to modify request -(void)postProcessRequest:(NSMutableURLRequest *)request { - // Always disable cookies! - [request setHTTPShouldHandleCookies:NO]; + } #pragma mark - -- (NSString*) pathWithQueryParamsToString:(NSString*) path - queryParams:(NSDictionary*) queryParams { +- (NSString*) pathWithQueryParamsToString:(NSString*) path queryParams:(NSDictionary*) queryParams { if(queryParams.count == 0) { return path; } @@ -434,9 +322,7 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) /** * Update header and query params based on authentication settings */ -- (void) updateHeaderParams:(NSDictionary *__autoreleasing *)headers - queryParams:(NSDictionary *__autoreleasing *)querys - WithAuthSettings:(NSArray *)authSettings { +- (void) updateHeaderParams:(NSDictionary * *)headers queryParams:(NSDictionary * *)querys WithAuthSettings:(NSArray *)authSettings { if ([authSettings count] == 0) { return; @@ -466,7 +352,7 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response) *querys = [NSDictionary dictionaryWithDictionary:querysWithAuth]; } -- (AFSecurityPolicy *) customSecurityPolicy { +- (AFSecurityPolicy *) createSecurityPolicy { AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; id<{{classPrefix}}Configuration> config = self.configuration; diff --git a/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache b/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache index 7a128929bbe..6cfcd2fae4c 100644 --- a/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache @@ -17,78 +17,19 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; @property (nonatomic, strong, readonly) id<{{classPrefix}}Configuration> configuration; -@property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property(nonatomic, assign) NSTimeInterval timeoutInterval; -@property(nonatomic, readonly) NSOperationQueue* queue; @property(nonatomic, strong) id<{{classPrefix}}ResponseDeserializer> responseDeserializer; @property(nonatomic, strong) id<{{classPrefix}}Sanitizer> sanitizer; -/** - * Clears Cache - */ -+(void)clearCache; -/** - * Turns on cache - * - * @param enabled If the cached is enable, must be `YES` or `NO` - */ -+(void)setCacheEnabled:(BOOL) enabled; - -/** - * Sets the client unreachable - * - * @param state off line state, must be `YES` or `NO` - */ -+(void) setOfflineState:(BOOL) state; - -/** - * Gets if the client is unreachable - * - * @return The client offline state - */ -+(BOOL) getOfflineState; - -/** - * Sets the client reachability, this may be overridden by the reachability manager if reachability changes - * - * @param The client reachability. - */ -+(void) setReachabilityStatus:(AFNetworkReachabilityStatus) status; - -/** - * Gets the client reachability - * - * @return The client reachability. - */ -+(AFNetworkReachabilityStatus) getReachabilityStatus; - -/** - * Customizes the behavior when the reachability changed - * - * @param changeBlock The block will be executed when the reachability changed. - */ -+(void) setReachabilityChangeBlock:(void(^)(int))changeBlock; +@property (nonatomic, strong) NSDictionary< NSString *, AFHTTPRequestSerializer *>* requestSerializerForContentType; /** * Gets client singleton instance */ + (instancetype) sharedClient; -/** - * Sets the api client reachability strategy - */ -- (void)configureCacheReachibility; - -/** - * Sets header for request - * - * @param value The header value - * @param forKey The header key - */ --(void)setHeaderValue:(NSString*) value - forKey:(NSString*) forKey; /** * Updates header parameters and query parameters for authentication @@ -97,9 +38,7 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; * @param querys The query parameters will be updated, passed by pointer to pointer. * @param authSettings The authentication names NSArray. */ -- (void) updateHeaderParams:(NSDictionary **)headers - queryParams:(NSDictionary **)querys - WithAuthSettings:(NSArray *)authSettings; +- (void) updateHeaderParams:(NSDictionary **)headers queryParams:(NSDictionary **)querys WithAuthSettings:(NSArray *)authSettings; /** @@ -109,6 +48,14 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; */ - (instancetype)initWithConfiguration:(id<{{classPrefix}}Configuration>)configuration; +/** +* Initializes the session manager with a configuration and url +* +* @param url The base url +* @param configuration The configuration implementation +*/ +- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id)configuration; + /** * Performs request * @@ -139,11 +86,4 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey; responseType: (NSString *) responseType completionBlock: (void (^)(id, NSError *))completionBlock; -/** - * Custom security policy - * - * @return AFSecurityPolicy - */ -- (AFSecurityPolicy *) customSecurityPolicy; - @end diff --git a/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache index ff8c9ea6577..548383a7e1e 100644 --- a/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/DefaultConfiguration-body.mustache @@ -36,7 +36,7 @@ _mutableApiKey = [NSMutableDictionary dictionary]; _mutableApiKeyPrefix = [NSMutableDictionary dictionary]; _mutableDefaultHeaders = [NSMutableDictionary dictionary]; - {{#httpUserAgent}}_mutableDefaultHeaders[@"User-Agent"] = @"{{httpUserAgent}}"{{/httpUserAgent}}; + {{#httpUserAgent}}_mutableDefaultHeaders[@"User-Agent"] = @"{{httpUserAgent}}";{{/httpUserAgent}} _logger = [{{classPrefix}}Logger sharedLogger]; } return self; @@ -144,8 +144,6 @@ self.logger.enabled = debug; } - - - (void)setDefaultHeaderValue:(NSString *)value forKey:(NSString *)key { if(!value) { [self.mutableDefaultHeaders removeObjectForKey:key]; diff --git a/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-body.mustache b/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-body.mustache deleted file mode 100644 index 7fa5e7b19e0..00000000000 --- a/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-body.mustache +++ /dev/null @@ -1,39 +0,0 @@ -#import "{{classPrefix}}JSONResponseSerializer.h" - -@implementation {{classPrefix}}JSONResponseSerializer - -/// -/// When customize a response serializer, -/// the serializer must conform the protocol `AFURLResponseSerialization` -/// and implements the protocol method `responseObjectForResponse:error:` -/// -/// @param response The response to be processed. -/// @param data The response data to be decoded. -/// @param error The error that occurred while attempting to decode the response data. -/// -/// @return The object decoded from the specified response data. -/// -- (id) responseObjectForResponse:(NSURLResponse *)response - data:(NSData *)data - error:(NSError *__autoreleasing *)error { - NSDictionary *responseJson = [super responseObjectForResponse:response data:data error:error]; - - // if response data is not a valid json, return string of data. - if ([self isParseError:*error]) { - *error = nil; - NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - return responseString; - } - - return responseJson; -} - --(BOOL)isParseError:(NSError *)error { - return [error.domain isEqualToString:NSCocoaErrorDomain] && error.code == 3840; -} - -+ (instancetype)serializer { - return [self serializerWithReadingOptions:NSJSONReadingAllowFragments]; -} - -@end diff --git a/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-header.mustache b/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-header.mustache deleted file mode 100644 index 360e4f9cdc5..00000000000 --- a/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-header.mustache +++ /dev/null @@ -1,8 +0,0 @@ -#import -#import - -{{>licenceInfo}} - -@interface {{classPrefix}}JSONResponseSerializer : AFJSONResponseSerializer - -@end diff --git a/modules/swagger-codegen/src/main/resources/objc/Logger-body.mustache b/modules/swagger-codegen/src/main/resources/objc/Logger-body.mustache index 9a8f7de2418..2bb03dd983a 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Logger-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Logger-body.mustache @@ -17,8 +17,7 @@ #pragma mark - Log Methods -- (void)debugLog:(NSString *)method - message:(NSString *)format, ... { +- (void)debugLog:(NSString *)method message:(NSString *)format, ... { if (!self.isEnabled) { return; } diff --git a/modules/swagger-codegen/src/main/resources/objc/ResponseDeserializer-body.mustache b/modules/swagger-codegen/src/main/resources/objc/ResponseDeserializer-body.mustache index 812ed061c04..467029fa971 100644 --- a/modules/swagger-codegen/src/main/resources/objc/ResponseDeserializer-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/ResponseDeserializer-body.mustache @@ -16,6 +16,7 @@ NSInteger const {{classPrefix}}UnknownResponseObjectErrorCode = 143528; @property (nonatomic, strong) NSNumberFormatter* numberFormatter; @property (nonatomic, strong) NSArray *primitiveTypes; @property (nonatomic, strong) NSArray *basicReturnTypes; +@property (nonatomic, strong) NSArray *dataReturnTypes; @property (nonatomic, strong) NSRegularExpression* arrayOfModelsPatExpression; @property (nonatomic, strong) NSRegularExpression* arrayOfPrimitivesPatExpression; @@ -33,7 +34,9 @@ NSInteger const {{classPrefix}}UnknownResponseObjectErrorCode = 143528; formatter.numberStyle = NSNumberFormatterDecimalStyle; _numberFormatter = formatter; _primitiveTypes = @[@"NSString", @"NSDate", @"NSNumber"]; - _basicReturnTypes = @[@"NSObject", @"id", @"NSData"]; + _basicReturnTypes = @[@"NSObject", @"id"]; + _dataReturnTypes = @[@"NSData"]; + _arrayOfModelsPatExpression = [NSRegularExpression regularExpressionWithPattern:@"NSArray<(.+)>" options:NSRegularExpressionCaseInsensitive error:nil]; @@ -53,23 +56,36 @@ NSInteger const {{classPrefix}}UnknownResponseObjectErrorCode = 143528; #pragma mark - Deserialize methods - (id) deserialize:(id) data class:(NSString *) className error:(NSError **) error { - // return nil if data is nil or className is nil - if (!data || !className || [data isKindOfClass:[NSNull class]]) { + if (!data || !className) { return nil; } - // remove "*" from className, if ends with "*" if ([className hasSuffix:@"*"]) { className = [className substringToIndex:[className length] - 1]; } + if([self.dataReturnTypes containsObject:className]) { + return data; + } + id jsonData = nil; + if([data isKindOfClass:[NSData class]]) { + jsonData = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:error]; + } else { + jsonData = data; + } + if(!jsonData) { + jsonData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + } else if([jsonData isKindOfClass:[NSNull class]]) { + return nil; + } + // pure object if ([self.basicReturnTypes containsObject:className]) { - return data; + return jsonData; } // primitives if ([self.primitiveTypes containsObject:className]) { - return [self deserializePrimitiveValue:data class:className error:error]; + return [self deserializePrimitiveValue:jsonData class:className error:error]; } NSTextCheckingResult *match = nil; @@ -78,37 +94,37 @@ NSInteger const {{classPrefix}}UnknownResponseObjectErrorCode = 143528; match = [self.arrayOfModelsPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *innerType = [className substringWithRange:[match rangeAtIndex:1]]; - return [self deserializeArrayValue:data innerType:innerType error:error]; + return [self deserializeArrayValue:jsonData innerType:innerType error:error]; } // list of primitives match = [self.arrayOfPrimitivesPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *innerType = [className substringWithRange:[match rangeAtIndex:1]]; - return [self deserializeArrayValue:data innerType:innerType error:error]; + return [self deserializeArrayValue:jsonData innerType:innerType error:error]; } // map match = [self.dictPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *valueType = [className substringWithRange:[match rangeAtIndex:2]]; - return [self deserializeDictionaryValue:data valueType:valueType error:error]; + return [self deserializeDictionaryValue:jsonData valueType:valueType error:error]; } match = [self.dictModelsPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *valueType = [className substringWithRange:[match rangeAtIndex:2]]; - return [self deserializeDictionaryValue:data valueType:valueType error:error]; + return [self deserializeDictionaryValue:jsonData valueType:valueType error:error]; } // model Class ModelClass = NSClassFromString(className); if ([ModelClass instancesRespondToSelector:@selector(initWithDictionary:error:)]) { - return [(JSONModel *) [ModelClass alloc] initWithDictionary:data error:error]; + return [(JSONModel *) [ModelClass alloc] initWithDictionary:jsonData error:error]; } if(error) { - *error = [self unknownResponseErrorWithExpectedType:className data:data]; + *error = [self unknownResponseErrorWithExpectedType:className data:jsonData]; } return nil; } @@ -172,7 +188,7 @@ NSInteger const {{classPrefix}}UnknownResponseObjectErrorCode = 143528; - (id) deserializePrimitiveValue:(id) data class:(NSString *) className error:(NSError**)error { if ([className isEqualToString:@"NSString"]) { - return [NSString stringWithString:data]; + return [NSString stringWithFormat:@"%@",data]; } else if ([className isEqualToString:@"NSDate"]) { return [self deserializeDateValue:data error:error]; diff --git a/modules/swagger-codegen/src/main/resources/objc/Sanitizer-body.mustache b/modules/swagger-codegen/src/main/resources/objc/Sanitizer-body.mustache index 00d74aaa1f7..465633a902c 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Sanitizer-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Sanitizer-body.mustache @@ -3,6 +3,8 @@ #import "{{classPrefix}}QueryParamCollection.h" #import +NSString * const k{{classPrefix}}ApplicationJSONType = @"application/json"; + NSString * {{classPrefix}}PercentEscapedStringFromString(NSString *string) { static NSString * const k{{classPrefix}}CharactersGeneralDelimitersToEncode = @":#[]@"; static NSString * const k{{classPrefix}}CharactersSubDelimitersToEncode = @"!$&'()*+,;="; @@ -43,8 +45,6 @@ NSString * {{classPrefix}}PercentEscapedStringFromString(NSString *string) { @implementation {{classPrefix}}Sanitizer -static NSString * kApplicationJSONType = @"application/json"; - -(instancetype)init { self = [super init]; if ( !self ) { @@ -141,7 +141,7 @@ static NSString * kApplicationJSONType = @"application/json"; NSMutableArray *lowerAccepts = [[NSMutableArray alloc] initWithCapacity:[accepts count]]; for (NSString *string in accepts) { if ([self.jsonHeaderTypeExpression matchesInString:string options:0 range:NSMakeRange(0, [string length])].count > 0) { - return kApplicationJSONType; + return k{{classPrefix}}ApplicationJSONType; } [lowerAccepts addObject:[string lowercaseString]]; } @@ -153,12 +153,12 @@ static NSString * kApplicationJSONType = @"application/json"; */ - (NSString *) selectHeaderContentType:(NSArray *)contentTypes { if (contentTypes.count == 0) { - return kApplicationJSONType; + return k{{classPrefix}}ApplicationJSONType; } NSMutableArray *lowerContentTypes = [[NSMutableArray alloc] initWithCapacity:[contentTypes count]]; for (NSString *string in contentTypes) { if([self.jsonHeaderTypeExpression matchesInString:string options:0 range:NSMakeRange(0, [string length])].count > 0){ - return kApplicationJSONType; + return k{{classPrefix}}ApplicationJSONType; } [lowerContentTypes addObject:[string lowercaseString]]; } diff --git a/modules/swagger-codegen/src/main/resources/objc/Sanitizer-header.mustache b/modules/swagger-codegen/src/main/resources/objc/Sanitizer-header.mustache index f975018a020..b6e77edb3f3 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Sanitizer-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Sanitizer-header.mustache @@ -4,6 +4,8 @@ extern NSString * {{classPrefix}}PercentEscapedStringFromString(NSString *string); +extern NSString * const k{{classPrefix}}ApplicationJSONType; + @protocol {{classPrefix}}Sanitizer /** diff --git a/samples/client/petstore/objc/core-data/README.md b/samples/client/petstore/objc/core-data/README.md index 5d44a3059a4..eb7dc0b57a8 100644 --- a/samples/client/petstore/objc/core-data/README.md +++ b/samples/client/petstore/objc/core-data/README.md @@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi - API version: 1.0.0 - Package version: -- Build date: 2016-08-17T10:06:58.453+02:00 +- Build date: 2016-08-23T10:56:27.632+02:00 - Build package: class io.swagger.codegen.languages.ObjcClientCodegen ## Requirements diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h index 4f7a6fda11a..cec2428f4b9 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h @@ -39,78 +39,19 @@ extern NSString *const SWGResponseObjectErrorKey; @property (nonatomic, strong, readonly) id configuration; -@property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property(nonatomic, assign) NSTimeInterval timeoutInterval; -@property(nonatomic, readonly) NSOperationQueue* queue; @property(nonatomic, strong) id responseDeserializer; @property(nonatomic, strong) id sanitizer; -/** - * Clears Cache - */ -+(void)clearCache; -/** - * Turns on cache - * - * @param enabled If the cached is enable, must be `YES` or `NO` - */ -+(void)setCacheEnabled:(BOOL) enabled; - -/** - * Sets the client unreachable - * - * @param state off line state, must be `YES` or `NO` - */ -+(void) setOfflineState:(BOOL) state; - -/** - * Gets if the client is unreachable - * - * @return The client offline state - */ -+(BOOL) getOfflineState; - -/** - * Sets the client reachability, this may be overridden by the reachability manager if reachability changes - * - * @param The client reachability. - */ -+(void) setReachabilityStatus:(AFNetworkReachabilityStatus) status; - -/** - * Gets the client reachability - * - * @return The client reachability. - */ -+(AFNetworkReachabilityStatus) getReachabilityStatus; - -/** - * Customizes the behavior when the reachability changed - * - * @param changeBlock The block will be executed when the reachability changed. - */ -+(void) setReachabilityChangeBlock:(void(^)(int))changeBlock; +@property (nonatomic, strong) NSDictionary< NSString *, AFHTTPRequestSerializer *>* requestSerializerForContentType; /** * Gets client singleton instance */ + (instancetype) sharedClient; -/** - * Sets the api client reachability strategy - */ -- (void)configureCacheReachibility; - -/** - * Sets header for request - * - * @param value The header value - * @param forKey The header key - */ --(void)setHeaderValue:(NSString*) value - forKey:(NSString*) forKey; /** * Updates header parameters and query parameters for authentication @@ -119,9 +60,7 @@ extern NSString *const SWGResponseObjectErrorKey; * @param querys The query parameters will be updated, passed by pointer to pointer. * @param authSettings The authentication names NSArray. */ -- (void) updateHeaderParams:(NSDictionary **)headers - queryParams:(NSDictionary **)querys - WithAuthSettings:(NSArray *)authSettings; +- (void) updateHeaderParams:(NSDictionary **)headers queryParams:(NSDictionary **)querys WithAuthSettings:(NSArray *)authSettings; /** @@ -131,6 +70,14 @@ extern NSString *const SWGResponseObjectErrorKey; */ - (instancetype)initWithConfiguration:(id)configuration; +/** +* Initializes the session manager with a configuration and url +* +* @param url The base url +* @param configuration The configuration implementation +*/ +- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id)configuration; + /** * Performs request * @@ -161,11 +108,4 @@ extern NSString *const SWGResponseObjectErrorKey; responseType: (NSString *) responseType completionBlock: (void (^)(id, NSError *))completionBlock; -/** - * Custom security policy - * - * @return AFSecurityPolicy - */ -- (AFSecurityPolicy *) customSecurityPolicy; - @end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m index e29f3a8f55f..f757e139d0e 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m @@ -1,21 +1,13 @@ -#import #import "SWGLogger.h" #import "SWGApiClient.h" #import "SWGJSONRequestSerializer.h" -#import "SWGJSONResponseSerializer.h" #import "SWGQueryParamCollection.h" #import "SWGDefaultConfiguration.h" - - NSString *const SWGResponseObjectErrorKey = @"SWGResponseObject"; -static bool offlineState = false; -static bool cacheEnabled = false; -static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable; -static void (^reachabilityChangeBlock)(int); - +static NSString * const kSWGContentDispositionKey = @"Content-Disposition"; static NSDictionary * SWG__headerFieldsForResponse(NSURLResponse *response) { if(![response isKindOfClass:[NSHTTPURLResponse class]]) { @@ -26,17 +18,13 @@ static NSDictionary * SWG__headerFieldsForResponse(NSURLResponse *response) { static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSDictionary * headers = SWG__headerFieldsForResponse(response); - if(!headers[@"Content-Disposition"]) { + if(!headers[kSWGContentDispositionKey]) { return [NSString stringWithFormat:@"%@", [[NSProcessInfo processInfo] globallyUniqueString]]; } NSString *pattern = @"filename=['\"]?([^'\"\\s]+)['\"]?"; - NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:pattern - options:NSRegularExpressionCaseInsensitive - error:nil]; - NSString *contentDispositionHeader = headers[@"Content-Disposition"]; - NSTextCheckingResult *match = [regexp firstMatchInString:contentDispositionHeader - options:0 - range:NSMakeRange(0, [contentDispositionHeader length])]; + NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:nil]; + NSString *contentDispositionHeader = headers[kSWGContentDispositionKey]; + NSTextCheckingResult *match = [regexp firstMatchInString:contentDispositionHeader options:0 range:NSMakeRange(0, [contentDispositionHeader length])]; return [contentDispositionHeader substringWithRange:[match rangeAtIndex:1]]; } @@ -45,6 +33,8 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { @property (nonatomic, strong, readwrite) id configuration; +@property (nonatomic, strong) NSArray* downloadTaskResponseTypes; + @end @implementation SWGApiClient @@ -75,7 +65,6 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { } - (instancetype)initWithBaseURL:(NSURL *)url configuration:(id)configuration { - self = [super initWithBaseURL:url]; if (self) { _configuration = configuration; @@ -83,102 +72,30 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { _responseDeserializer = [[SWGResponseDeserializer alloc] init]; _sanitizer = [[SWGSanitizer alloc] init]; - self.requestSerializer = [AFJSONRequestSerializer serializer]; - self.responseSerializer = [AFJSONResponseSerializer serializer]; - self.securityPolicy = [self customSecurityPolicy]; + _downloadTaskResponseTypes = @[@"NSURL*", @"NSURL"]; - // configure reachability - [self configureCacheReachibility]; + AFHTTPRequestSerializer* afhttpRequestSerializer = [AFHTTPRequestSerializer serializer]; + SWGJSONRequestSerializer * swgjsonRequestSerializer = [SWGJSONRequestSerializer serializer]; + _requestSerializerForContentType = @{kSWGApplicationJSONType : swgjsonRequestSerializer, + @"application/x-www-form-urlencoded": afhttpRequestSerializer, + @"multipart/form-data": afhttpRequestSerializer + }; + self.securityPolicy = [self createSecurityPolicy]; + self.responseSerializer = [AFHTTPResponseSerializer serializer]; } - return self; } -#pragma mark - Setter Methods - -+ (void) setOfflineState:(BOOL) state { - offlineState = state; -} - -+ (void) setCacheEnabled:(BOOL)enabled { - cacheEnabled = enabled; -} - -+(void) setReachabilityStatus:(AFNetworkReachabilityStatus)status { - reachabilityStatus = status; -} - -- (void)setHeaderValue:(NSString*) value forKey:(NSString*) forKey { - [self.requestSerializer setValue:value forHTTPHeaderField:forKey]; -} - -- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { - [super setRequestSerializer:requestSerializer]; - requestSerializer.timeoutInterval = self.timeoutInterval; -} - -#pragma mark - Cache Methods - -+(void)clearCache { - [[NSURLCache sharedURLCache] removeAllCachedResponses]; -} - -+(void)configureCacheWithMemoryAndDiskCapacity: (unsigned long) memorySize - diskSize: (unsigned long) diskSize { - NSAssert(memorySize > 0, @"invalid in-memory cache size"); - NSAssert(diskSize >= 0, @"invalid disk cache size"); - - NSURLCache *cache = - [[NSURLCache alloc] - initWithMemoryCapacity:memorySize - diskCapacity:diskSize - diskPath:@"swagger_url_cache"]; - - [NSURLCache setSharedURLCache:cache]; -} - -#pragma mark - Reachability Methods - -+(AFNetworkReachabilityStatus) getReachabilityStatus { - return reachabilityStatus; -} - -+(BOOL) getOfflineState { - return offlineState; -} - -+(void) setReachabilityChangeBlock:(void(^)(int))changeBlock { - reachabilityChangeBlock = changeBlock; -} - -- (void) configureCacheReachibility { - [self.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { - reachabilityStatus = status; - SWGDebugLog(@"reachability changed to %@",AFStringFromNetworkReachabilityStatus(status)); - [SWGApiClient setOfflineState:status == AFNetworkReachabilityStatusUnknown || status == AFNetworkReachabilityStatusNotReachable]; - - // call the reachability block, if configured - if (reachabilityChangeBlock != nil) { - reachabilityChangeBlock(status); - } - }]; - - [self.reachabilityManager startMonitoring]; -} - #pragma mark - Task Methods -- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request - completionBlock: (void (^)(id, NSError *))completionBlock { +- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock { NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { SWGDebugLogResponse(response, responseObject,request,error); - if(!error) { completionBlock(responseObject, nil); return; } - NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { // Add in the (parsed) response body. @@ -191,10 +108,9 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { return task; } -- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request - completionBlock: (void (^)(id, NSError *))completionBlock { - - id config = self.configuration; +- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock { + + __block NSString * tempFolderPath = [self.configuration.tempFolderPath copy]; NSURLSessionDataTask* task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { SWGDebugLogResponse(response, responseObject,request,error); @@ -206,9 +122,10 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { } NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); + return; } - NSString *directory = config.tempFolderPath ?: NSTemporaryDirectory(); + NSString *directory = tempFolderPath ?: NSTemporaryDirectory(); NSString *filename = SWG__fileNameForResponse(response); NSString *filepath = [directory stringByAppendingPathComponent:filename]; @@ -238,35 +155,17 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { responseType: (NSString *) responseType completionBlock: (void (^)(id, NSError *))completionBlock { - // setting request serializer - if ([requestContentType isEqualToString:@"application/json"]) { - self.requestSerializer = [SWGJSONRequestSerializer serializer]; - } - else if ([requestContentType isEqualToString:@"application/x-www-form-urlencoded"]) { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - } - else if ([requestContentType isEqualToString:@"multipart/form-data"]) { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - } - else { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - NSAssert(NO, @"Unsupported request type %@", requestContentType); - } + AFHTTPRequestSerializer * requestSerializer = [self requestSerializerForRequestContentType:requestContentType]; - // setting response serializer - if ([responseContentType isEqualToString:@"application/json"]) { - self.responseSerializer = [SWGJSONResponseSerializer serializer]; - } else { - self.responseSerializer = [AFHTTPResponseSerializer serializer]; - } + __weak id sanitizer = self.sanitizer; // sanitize parameters - pathParams = [self.sanitizer sanitizeForSerialization:pathParams]; - queryParams = [self.sanitizer sanitizeForSerialization:queryParams]; - headerParams = [self.sanitizer sanitizeForSerialization:headerParams]; - formParams = [self.sanitizer sanitizeForSerialization:formParams]; + pathParams = [sanitizer sanitizeForSerialization:pathParams]; + queryParams = [sanitizer sanitizeForSerialization:queryParams]; + headerParams = [sanitizer sanitizeForSerialization:headerParams]; + formParams = [sanitizer sanitizeForSerialization:formParams]; if(![body isKindOfClass:[NSData class]]) { - body = [self.sanitizer sanitizeForSerialization:body]; + body = [sanitizer sanitizeForSerialization:body]; } // auth setting @@ -279,22 +178,19 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [resourcePath replaceCharactersInRange:[resourcePath rangeOfString:[NSString stringWithFormat:@"{%@}", key]] withString:safeString]; }]; - NSMutableURLRequest * request = nil; - NSString* pathWithQueryParams = [self pathWithQueryParamsToString:resourcePath queryParams:queryParams]; if ([pathWithQueryParams hasPrefix:@"/"]) { pathWithQueryParams = [pathWithQueryParams substringFromIndex:1]; } NSString* urlString = [[NSURL URLWithString:pathWithQueryParams relativeToURL:self.baseURL] absoluteString]; + + NSError *requestCreateError = nil; + NSMutableURLRequest * request = nil; if (files.count > 0) { - __weak __typeof(self)weakSelf = self; - request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" - URLString:urlString - parameters:nil - constructingBodyWithBlock:^(id formData) { + request = [requestSerializer multipartFormRequestWithMethod:@"POST" URLString:urlString parameters:nil constructingBodyWithBlock:^(id formData) { [formParams enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { - NSString *objString = [weakSelf.sanitizer parameterToString:obj]; + NSString *objString = [sanitizer parameterToString:obj]; NSData *data = [objString dataUsingEncoding:NSUTF8StringEncoding]; [formData appendPartWithFormData:data name:key]; }]; @@ -302,59 +198,43 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSURL *filePath = (NSURL *)obj; [formData appendPartWithFileURL:filePath name:key error:nil]; }]; - } error:nil]; + } error:&requestCreateError]; } else { if (formParams) { - request = [self.requestSerializer requestWithMethod:method - URLString:urlString - parameters:formParams - error:nil]; + request = [requestSerializer requestWithMethod:method URLString:urlString parameters:formParams error:&requestCreateError]; } if (body) { - request = [self.requestSerializer requestWithMethod:method - URLString:urlString - parameters:body - error:nil]; + request = [requestSerializer requestWithMethod:method URLString:urlString parameters:body error:&requestCreateError]; } } - - // request cache - BOOL hasHeaderParams = [headerParams count] > 0; - if (offlineState) { - SWGDebugLog(@"%@ cache forced", resourcePath); - [request setCachePolicy:NSURLRequestReturnCacheDataDontLoad]; - } - else if(!hasHeaderParams && [method isEqualToString:@"GET"] && cacheEnabled) { - SWGDebugLog(@"%@ cache enabled", resourcePath); - [request setCachePolicy:NSURLRequestUseProtocolCachePolicy]; - } - else { - SWGDebugLog(@"%@ cache disabled", resourcePath); - [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; + if(!request) { + completionBlock(nil, requestCreateError); + return nil; } - if (hasHeaderParams){ + if ([headerParams count] > 0){ for(NSString * key in [headerParams keyEnumerator]){ [request setValue:[headerParams valueForKey:key] forHTTPHeaderField:key]; } } - [self.requestSerializer setValue:responseContentType forHTTPHeaderField:@"Accept"]; + [requestSerializer setValue:responseContentType forHTTPHeaderField:@"Accept"]; [self postProcessRequest:request]; NSURLSessionTask *task = nil; - if ([responseType isEqualToString:@"NSURL*"] || [responseType isEqualToString:@"NSURL"]) { + if ([self.downloadTaskResponseTypes containsObject:responseType]) { task = [self downloadTaskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { completionBlock(data, error); }]; - } - else { + } else { + __weak typeof(self) weakSelf = self; task = [self taskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { NSError * serializationError; - id response = [self.responseDeserializer deserialize:data class:responseType error:&serializationError]; + id response = [weakSelf.responseDeserializer deserialize:data class:responseType error:&serializationError]; + if(!response && !error){ error = serializationError; } @@ -367,16 +247,24 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { return task; } +-(AFHTTPRequestSerializer *)requestSerializerForRequestContentType:(NSString *)requestContentType { + AFHTTPRequestSerializer * serializer = self.requestSerializerForContentType[requestContentType]; + if(!serializer) { + NSAssert(NO, @"Unsupported request content type %@", requestContentType); + serializer = [AFHTTPRequestSerializer serializer]; + } + serializer.timeoutInterval = self.timeoutInterval; + return serializer; +} + //Added for easier override to modify request -(void)postProcessRequest:(NSMutableURLRequest *)request { - // Always disable cookies! - [request setHTTPShouldHandleCookies:NO]; + } #pragma mark - -- (NSString*) pathWithQueryParamsToString:(NSString*) path - queryParams:(NSDictionary*) queryParams { +- (NSString*) pathWithQueryParamsToString:(NSString*) path queryParams:(NSDictionary*) queryParams { if(queryParams.count == 0) { return path; } @@ -434,9 +322,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { /** * Update header and query params based on authentication settings */ -- (void) updateHeaderParams:(NSDictionary *__autoreleasing *)headers - queryParams:(NSDictionary *__autoreleasing *)querys - WithAuthSettings:(NSArray *)authSettings { +- (void) updateHeaderParams:(NSDictionary * *)headers queryParams:(NSDictionary * *)querys WithAuthSettings:(NSArray *)authSettings { if ([authSettings count] == 0) { return; @@ -466,7 +352,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { *querys = [NSDictionary dictionaryWithDictionary:querysWithAuth]; } -- (AFSecurityPolicy *) customSecurityPolicy { +- (AFSecurityPolicy *) createSecurityPolicy { AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; id config = self.configuration; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m index 225d24155eb..705580e9a54 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.m @@ -36,7 +36,7 @@ _mutableApiKey = [NSMutableDictionary dictionary]; _mutableApiKeyPrefix = [NSMutableDictionary dictionary]; _mutableDefaultHeaders = [NSMutableDictionary dictionary]; - ; + _logger = [SWGLogger sharedLogger]; } return self; @@ -129,8 +129,6 @@ self.logger.enabled = debug; } - - - (void)setDefaultHeaderValue:(NSString *)value forKey:(NSString *)key { if(!value) { [self.mutableDefaultHeaders removeObjectForKey:key]; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGLogger.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGLogger.m index 322ae9678d7..2a96e5ec54d 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGLogger.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGLogger.m @@ -17,8 +17,7 @@ #pragma mark - Log Methods -- (void)debugLog:(NSString *)method - message:(NSString *)format, ... { +- (void)debugLog:(NSString *)method message:(NSString *)format, ... { if (!self.isEnabled) { return; } diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.m index a0efd1d5927..e38aeb9b63f 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.m @@ -16,6 +16,7 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; @property (nonatomic, strong) NSNumberFormatter* numberFormatter; @property (nonatomic, strong) NSArray *primitiveTypes; @property (nonatomic, strong) NSArray *basicReturnTypes; +@property (nonatomic, strong) NSArray *dataReturnTypes; @property (nonatomic, strong) NSRegularExpression* arrayOfModelsPatExpression; @property (nonatomic, strong) NSRegularExpression* arrayOfPrimitivesPatExpression; @@ -33,7 +34,9 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; formatter.numberStyle = NSNumberFormatterDecimalStyle; _numberFormatter = formatter; _primitiveTypes = @[@"NSString", @"NSDate", @"NSNumber"]; - _basicReturnTypes = @[@"NSObject", @"id", @"NSData"]; + _basicReturnTypes = @[@"NSObject", @"id"]; + _dataReturnTypes = @[@"NSData"]; + _arrayOfModelsPatExpression = [NSRegularExpression regularExpressionWithPattern:@"NSArray<(.+)>" options:NSRegularExpressionCaseInsensitive error:nil]; @@ -53,23 +56,36 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; #pragma mark - Deserialize methods - (id) deserialize:(id) data class:(NSString *) className error:(NSError **) error { - // return nil if data is nil or className is nil - if (!data || !className || [data isKindOfClass:[NSNull class]]) { + if (!data || !className) { return nil; } - // remove "*" from className, if ends with "*" if ([className hasSuffix:@"*"]) { className = [className substringToIndex:[className length] - 1]; } + if([self.dataReturnTypes containsObject:className]) { + return data; + } + id jsonData = nil; + if([data isKindOfClass:[NSData class]]) { + jsonData = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:error]; + } else { + jsonData = data; + } + if(!jsonData) { + jsonData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + } else if([jsonData isKindOfClass:[NSNull class]]) { + return nil; + } + // pure object if ([self.basicReturnTypes containsObject:className]) { - return data; + return jsonData; } // primitives if ([self.primitiveTypes containsObject:className]) { - return [self deserializePrimitiveValue:data class:className error:error]; + return [self deserializePrimitiveValue:jsonData class:className error:error]; } NSTextCheckingResult *match = nil; @@ -78,37 +94,37 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; match = [self.arrayOfModelsPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *innerType = [className substringWithRange:[match rangeAtIndex:1]]; - return [self deserializeArrayValue:data innerType:innerType error:error]; + return [self deserializeArrayValue:jsonData innerType:innerType error:error]; } // list of primitives match = [self.arrayOfPrimitivesPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *innerType = [className substringWithRange:[match rangeAtIndex:1]]; - return [self deserializeArrayValue:data innerType:innerType error:error]; + return [self deserializeArrayValue:jsonData innerType:innerType error:error]; } // map match = [self.dictPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *valueType = [className substringWithRange:[match rangeAtIndex:2]]; - return [self deserializeDictionaryValue:data valueType:valueType error:error]; + return [self deserializeDictionaryValue:jsonData valueType:valueType error:error]; } match = [self.dictModelsPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *valueType = [className substringWithRange:[match rangeAtIndex:2]]; - return [self deserializeDictionaryValue:data valueType:valueType error:error]; + return [self deserializeDictionaryValue:jsonData valueType:valueType error:error]; } // model Class ModelClass = NSClassFromString(className); if ([ModelClass instancesRespondToSelector:@selector(initWithDictionary:error:)]) { - return [(JSONModel *) [ModelClass alloc] initWithDictionary:data error:error]; + return [(JSONModel *) [ModelClass alloc] initWithDictionary:jsonData error:error]; } if(error) { - *error = [self unknownResponseErrorWithExpectedType:className data:data]; + *error = [self unknownResponseErrorWithExpectedType:className data:jsonData]; } return nil; } @@ -172,7 +188,7 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; - (id) deserializePrimitiveValue:(id) data class:(NSString *) className error:(NSError**)error { if ([className isEqualToString:@"NSString"]) { - return [NSString stringWithString:data]; + return [NSString stringWithFormat:@"%@",data]; } else if ([className isEqualToString:@"NSDate"]) { return [self deserializeDateValue:data error:error]; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.h index 59699c2bdd5..d934882a7b1 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.h @@ -26,6 +26,8 @@ extern NSString * SWGPercentEscapedStringFromString(NSString *string); +extern NSString * const kSWGApplicationJSONType; + @protocol SWGSanitizer /** diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.m index a74f72afbe3..49ff6ed014a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.m @@ -3,6 +3,8 @@ #import "SWGQueryParamCollection.h" #import +NSString * const kSWGApplicationJSONType = @"application/json"; + NSString * SWGPercentEscapedStringFromString(NSString *string) { static NSString * const kSWGCharactersGeneralDelimitersToEncode = @":#[]@"; static NSString * const kSWGCharactersSubDelimitersToEncode = @"!$&'()*+,;="; @@ -43,8 +45,6 @@ NSString * SWGPercentEscapedStringFromString(NSString *string) { @implementation SWGSanitizer -static NSString * kApplicationJSONType = @"application/json"; - -(instancetype)init { self = [super init]; if ( !self ) { @@ -141,7 +141,7 @@ static NSString * kApplicationJSONType = @"application/json"; NSMutableArray *lowerAccepts = [[NSMutableArray alloc] initWithCapacity:[accepts count]]; for (NSString *string in accepts) { if ([self.jsonHeaderTypeExpression matchesInString:string options:0 range:NSMakeRange(0, [string length])].count > 0) { - return kApplicationJSONType; + return kSWGApplicationJSONType; } [lowerAccepts addObject:[string lowercaseString]]; } @@ -153,12 +153,12 @@ static NSString * kApplicationJSONType = @"application/json"; */ - (NSString *) selectHeaderContentType:(NSArray *)contentTypes { if (contentTypes.count == 0) { - return kApplicationJSONType; + return kSWGApplicationJSONType; } NSMutableArray *lowerContentTypes = [[NSMutableArray alloc] initWithCapacity:[contentTypes count]]; for (NSString *string in contentTypes) { if([self.jsonHeaderTypeExpression matchesInString:string options:0 range:NSMakeRange(0, [string length])].count > 0){ - return kApplicationJSONType; + return kSWGApplicationJSONType; } [lowerContentTypes addObject:[string lowercaseString]]; } diff --git a/samples/client/petstore/objc/default/README.md b/samples/client/petstore/objc/default/README.md index b066c97b038..dc09ad22254 100644 --- a/samples/client/petstore/objc/default/README.md +++ b/samples/client/petstore/objc/default/README.md @@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi - API version: 1.0.0 - Package version: -- Build date: 2016-08-17T10:06:57.326+02:00 +- Build date: 2016-08-23T10:56:26.470+02:00 - Build package: class io.swagger.codegen.languages.ObjcClientCodegen ## Requirements diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h index 4f7a6fda11a..cec2428f4b9 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h @@ -39,78 +39,19 @@ extern NSString *const SWGResponseObjectErrorKey; @property (nonatomic, strong, readonly) id configuration; -@property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property(nonatomic, assign) NSTimeInterval timeoutInterval; -@property(nonatomic, readonly) NSOperationQueue* queue; @property(nonatomic, strong) id responseDeserializer; @property(nonatomic, strong) id sanitizer; -/** - * Clears Cache - */ -+(void)clearCache; -/** - * Turns on cache - * - * @param enabled If the cached is enable, must be `YES` or `NO` - */ -+(void)setCacheEnabled:(BOOL) enabled; - -/** - * Sets the client unreachable - * - * @param state off line state, must be `YES` or `NO` - */ -+(void) setOfflineState:(BOOL) state; - -/** - * Gets if the client is unreachable - * - * @return The client offline state - */ -+(BOOL) getOfflineState; - -/** - * Sets the client reachability, this may be overridden by the reachability manager if reachability changes - * - * @param The client reachability. - */ -+(void) setReachabilityStatus:(AFNetworkReachabilityStatus) status; - -/** - * Gets the client reachability - * - * @return The client reachability. - */ -+(AFNetworkReachabilityStatus) getReachabilityStatus; - -/** - * Customizes the behavior when the reachability changed - * - * @param changeBlock The block will be executed when the reachability changed. - */ -+(void) setReachabilityChangeBlock:(void(^)(int))changeBlock; +@property (nonatomic, strong) NSDictionary< NSString *, AFHTTPRequestSerializer *>* requestSerializerForContentType; /** * Gets client singleton instance */ + (instancetype) sharedClient; -/** - * Sets the api client reachability strategy - */ -- (void)configureCacheReachibility; - -/** - * Sets header for request - * - * @param value The header value - * @param forKey The header key - */ --(void)setHeaderValue:(NSString*) value - forKey:(NSString*) forKey; /** * Updates header parameters and query parameters for authentication @@ -119,9 +60,7 @@ extern NSString *const SWGResponseObjectErrorKey; * @param querys The query parameters will be updated, passed by pointer to pointer. * @param authSettings The authentication names NSArray. */ -- (void) updateHeaderParams:(NSDictionary **)headers - queryParams:(NSDictionary **)querys - WithAuthSettings:(NSArray *)authSettings; +- (void) updateHeaderParams:(NSDictionary **)headers queryParams:(NSDictionary **)querys WithAuthSettings:(NSArray *)authSettings; /** @@ -131,6 +70,14 @@ extern NSString *const SWGResponseObjectErrorKey; */ - (instancetype)initWithConfiguration:(id)configuration; +/** +* Initializes the session manager with a configuration and url +* +* @param url The base url +* @param configuration The configuration implementation +*/ +- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id)configuration; + /** * Performs request * @@ -161,11 +108,4 @@ extern NSString *const SWGResponseObjectErrorKey; responseType: (NSString *) responseType completionBlock: (void (^)(id, NSError *))completionBlock; -/** - * Custom security policy - * - * @return AFSecurityPolicy - */ -- (AFSecurityPolicy *) customSecurityPolicy; - @end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m index e29f3a8f55f..f757e139d0e 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.m @@ -1,21 +1,13 @@ -#import #import "SWGLogger.h" #import "SWGApiClient.h" #import "SWGJSONRequestSerializer.h" -#import "SWGJSONResponseSerializer.h" #import "SWGQueryParamCollection.h" #import "SWGDefaultConfiguration.h" - - NSString *const SWGResponseObjectErrorKey = @"SWGResponseObject"; -static bool offlineState = false; -static bool cacheEnabled = false; -static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable; -static void (^reachabilityChangeBlock)(int); - +static NSString * const kSWGContentDispositionKey = @"Content-Disposition"; static NSDictionary * SWG__headerFieldsForResponse(NSURLResponse *response) { if(![response isKindOfClass:[NSHTTPURLResponse class]]) { @@ -26,17 +18,13 @@ static NSDictionary * SWG__headerFieldsForResponse(NSURLResponse *response) { static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSDictionary * headers = SWG__headerFieldsForResponse(response); - if(!headers[@"Content-Disposition"]) { + if(!headers[kSWGContentDispositionKey]) { return [NSString stringWithFormat:@"%@", [[NSProcessInfo processInfo] globallyUniqueString]]; } NSString *pattern = @"filename=['\"]?([^'\"\\s]+)['\"]?"; - NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:pattern - options:NSRegularExpressionCaseInsensitive - error:nil]; - NSString *contentDispositionHeader = headers[@"Content-Disposition"]; - NSTextCheckingResult *match = [regexp firstMatchInString:contentDispositionHeader - options:0 - range:NSMakeRange(0, [contentDispositionHeader length])]; + NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:nil]; + NSString *contentDispositionHeader = headers[kSWGContentDispositionKey]; + NSTextCheckingResult *match = [regexp firstMatchInString:contentDispositionHeader options:0 range:NSMakeRange(0, [contentDispositionHeader length])]; return [contentDispositionHeader substringWithRange:[match rangeAtIndex:1]]; } @@ -45,6 +33,8 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { @property (nonatomic, strong, readwrite) id configuration; +@property (nonatomic, strong) NSArray* downloadTaskResponseTypes; + @end @implementation SWGApiClient @@ -75,7 +65,6 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { } - (instancetype)initWithBaseURL:(NSURL *)url configuration:(id)configuration { - self = [super initWithBaseURL:url]; if (self) { _configuration = configuration; @@ -83,102 +72,30 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { _responseDeserializer = [[SWGResponseDeserializer alloc] init]; _sanitizer = [[SWGSanitizer alloc] init]; - self.requestSerializer = [AFJSONRequestSerializer serializer]; - self.responseSerializer = [AFJSONResponseSerializer serializer]; - self.securityPolicy = [self customSecurityPolicy]; + _downloadTaskResponseTypes = @[@"NSURL*", @"NSURL"]; - // configure reachability - [self configureCacheReachibility]; + AFHTTPRequestSerializer* afhttpRequestSerializer = [AFHTTPRequestSerializer serializer]; + SWGJSONRequestSerializer * swgjsonRequestSerializer = [SWGJSONRequestSerializer serializer]; + _requestSerializerForContentType = @{kSWGApplicationJSONType : swgjsonRequestSerializer, + @"application/x-www-form-urlencoded": afhttpRequestSerializer, + @"multipart/form-data": afhttpRequestSerializer + }; + self.securityPolicy = [self createSecurityPolicy]; + self.responseSerializer = [AFHTTPResponseSerializer serializer]; } - return self; } -#pragma mark - Setter Methods - -+ (void) setOfflineState:(BOOL) state { - offlineState = state; -} - -+ (void) setCacheEnabled:(BOOL)enabled { - cacheEnabled = enabled; -} - -+(void) setReachabilityStatus:(AFNetworkReachabilityStatus)status { - reachabilityStatus = status; -} - -- (void)setHeaderValue:(NSString*) value forKey:(NSString*) forKey { - [self.requestSerializer setValue:value forHTTPHeaderField:forKey]; -} - -- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { - [super setRequestSerializer:requestSerializer]; - requestSerializer.timeoutInterval = self.timeoutInterval; -} - -#pragma mark - Cache Methods - -+(void)clearCache { - [[NSURLCache sharedURLCache] removeAllCachedResponses]; -} - -+(void)configureCacheWithMemoryAndDiskCapacity: (unsigned long) memorySize - diskSize: (unsigned long) diskSize { - NSAssert(memorySize > 0, @"invalid in-memory cache size"); - NSAssert(diskSize >= 0, @"invalid disk cache size"); - - NSURLCache *cache = - [[NSURLCache alloc] - initWithMemoryCapacity:memorySize - diskCapacity:diskSize - diskPath:@"swagger_url_cache"]; - - [NSURLCache setSharedURLCache:cache]; -} - -#pragma mark - Reachability Methods - -+(AFNetworkReachabilityStatus) getReachabilityStatus { - return reachabilityStatus; -} - -+(BOOL) getOfflineState { - return offlineState; -} - -+(void) setReachabilityChangeBlock:(void(^)(int))changeBlock { - reachabilityChangeBlock = changeBlock; -} - -- (void) configureCacheReachibility { - [self.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { - reachabilityStatus = status; - SWGDebugLog(@"reachability changed to %@",AFStringFromNetworkReachabilityStatus(status)); - [SWGApiClient setOfflineState:status == AFNetworkReachabilityStatusUnknown || status == AFNetworkReachabilityStatusNotReachable]; - - // call the reachability block, if configured - if (reachabilityChangeBlock != nil) { - reachabilityChangeBlock(status); - } - }]; - - [self.reachabilityManager startMonitoring]; -} - #pragma mark - Task Methods -- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request - completionBlock: (void (^)(id, NSError *))completionBlock { +- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock { NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { SWGDebugLogResponse(response, responseObject,request,error); - if(!error) { completionBlock(responseObject, nil); return; } - NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; if (responseObject) { // Add in the (parsed) response body. @@ -191,10 +108,9 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { return task; } -- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request - completionBlock: (void (^)(id, NSError *))completionBlock { - - id config = self.configuration; +- (NSURLSessionDataTask*) downloadTaskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock { + + __block NSString * tempFolderPath = [self.configuration.tempFolderPath copy]; NSURLSessionDataTask* task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { SWGDebugLogResponse(response, responseObject,request,error); @@ -206,9 +122,10 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { } NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); + return; } - NSString *directory = config.tempFolderPath ?: NSTemporaryDirectory(); + NSString *directory = tempFolderPath ?: NSTemporaryDirectory(); NSString *filename = SWG__fileNameForResponse(response); NSString *filepath = [directory stringByAppendingPathComponent:filename]; @@ -238,35 +155,17 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { responseType: (NSString *) responseType completionBlock: (void (^)(id, NSError *))completionBlock { - // setting request serializer - if ([requestContentType isEqualToString:@"application/json"]) { - self.requestSerializer = [SWGJSONRequestSerializer serializer]; - } - else if ([requestContentType isEqualToString:@"application/x-www-form-urlencoded"]) { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - } - else if ([requestContentType isEqualToString:@"multipart/form-data"]) { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - } - else { - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - NSAssert(NO, @"Unsupported request type %@", requestContentType); - } + AFHTTPRequestSerializer * requestSerializer = [self requestSerializerForRequestContentType:requestContentType]; - // setting response serializer - if ([responseContentType isEqualToString:@"application/json"]) { - self.responseSerializer = [SWGJSONResponseSerializer serializer]; - } else { - self.responseSerializer = [AFHTTPResponseSerializer serializer]; - } + __weak id sanitizer = self.sanitizer; // sanitize parameters - pathParams = [self.sanitizer sanitizeForSerialization:pathParams]; - queryParams = [self.sanitizer sanitizeForSerialization:queryParams]; - headerParams = [self.sanitizer sanitizeForSerialization:headerParams]; - formParams = [self.sanitizer sanitizeForSerialization:formParams]; + pathParams = [sanitizer sanitizeForSerialization:pathParams]; + queryParams = [sanitizer sanitizeForSerialization:queryParams]; + headerParams = [sanitizer sanitizeForSerialization:headerParams]; + formParams = [sanitizer sanitizeForSerialization:formParams]; if(![body isKindOfClass:[NSData class]]) { - body = [self.sanitizer sanitizeForSerialization:body]; + body = [sanitizer sanitizeForSerialization:body]; } // auth setting @@ -279,22 +178,19 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [resourcePath replaceCharactersInRange:[resourcePath rangeOfString:[NSString stringWithFormat:@"{%@}", key]] withString:safeString]; }]; - NSMutableURLRequest * request = nil; - NSString* pathWithQueryParams = [self pathWithQueryParamsToString:resourcePath queryParams:queryParams]; if ([pathWithQueryParams hasPrefix:@"/"]) { pathWithQueryParams = [pathWithQueryParams substringFromIndex:1]; } NSString* urlString = [[NSURL URLWithString:pathWithQueryParams relativeToURL:self.baseURL] absoluteString]; + + NSError *requestCreateError = nil; + NSMutableURLRequest * request = nil; if (files.count > 0) { - __weak __typeof(self)weakSelf = self; - request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" - URLString:urlString - parameters:nil - constructingBodyWithBlock:^(id formData) { + request = [requestSerializer multipartFormRequestWithMethod:@"POST" URLString:urlString parameters:nil constructingBodyWithBlock:^(id formData) { [formParams enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { - NSString *objString = [weakSelf.sanitizer parameterToString:obj]; + NSString *objString = [sanitizer parameterToString:obj]; NSData *data = [objString dataUsingEncoding:NSUTF8StringEncoding]; [formData appendPartWithFormData:data name:key]; }]; @@ -302,59 +198,43 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSURL *filePath = (NSURL *)obj; [formData appendPartWithFileURL:filePath name:key error:nil]; }]; - } error:nil]; + } error:&requestCreateError]; } else { if (formParams) { - request = [self.requestSerializer requestWithMethod:method - URLString:urlString - parameters:formParams - error:nil]; + request = [requestSerializer requestWithMethod:method URLString:urlString parameters:formParams error:&requestCreateError]; } if (body) { - request = [self.requestSerializer requestWithMethod:method - URLString:urlString - parameters:body - error:nil]; + request = [requestSerializer requestWithMethod:method URLString:urlString parameters:body error:&requestCreateError]; } } - - // request cache - BOOL hasHeaderParams = [headerParams count] > 0; - if (offlineState) { - SWGDebugLog(@"%@ cache forced", resourcePath); - [request setCachePolicy:NSURLRequestReturnCacheDataDontLoad]; - } - else if(!hasHeaderParams && [method isEqualToString:@"GET"] && cacheEnabled) { - SWGDebugLog(@"%@ cache enabled", resourcePath); - [request setCachePolicy:NSURLRequestUseProtocolCachePolicy]; - } - else { - SWGDebugLog(@"%@ cache disabled", resourcePath); - [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; + if(!request) { + completionBlock(nil, requestCreateError); + return nil; } - if (hasHeaderParams){ + if ([headerParams count] > 0){ for(NSString * key in [headerParams keyEnumerator]){ [request setValue:[headerParams valueForKey:key] forHTTPHeaderField:key]; } } - [self.requestSerializer setValue:responseContentType forHTTPHeaderField:@"Accept"]; + [requestSerializer setValue:responseContentType forHTTPHeaderField:@"Accept"]; [self postProcessRequest:request]; NSURLSessionTask *task = nil; - if ([responseType isEqualToString:@"NSURL*"] || [responseType isEqualToString:@"NSURL"]) { + if ([self.downloadTaskResponseTypes containsObject:responseType]) { task = [self downloadTaskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { completionBlock(data, error); }]; - } - else { + } else { + __weak typeof(self) weakSelf = self; task = [self taskWithCompletionBlock:request completionBlock:^(id data, NSError *error) { NSError * serializationError; - id response = [self.responseDeserializer deserialize:data class:responseType error:&serializationError]; + id response = [weakSelf.responseDeserializer deserialize:data class:responseType error:&serializationError]; + if(!response && !error){ error = serializationError; } @@ -367,16 +247,24 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { return task; } +-(AFHTTPRequestSerializer *)requestSerializerForRequestContentType:(NSString *)requestContentType { + AFHTTPRequestSerializer * serializer = self.requestSerializerForContentType[requestContentType]; + if(!serializer) { + NSAssert(NO, @"Unsupported request content type %@", requestContentType); + serializer = [AFHTTPRequestSerializer serializer]; + } + serializer.timeoutInterval = self.timeoutInterval; + return serializer; +} + //Added for easier override to modify request -(void)postProcessRequest:(NSMutableURLRequest *)request { - // Always disable cookies! - [request setHTTPShouldHandleCookies:NO]; + } #pragma mark - -- (NSString*) pathWithQueryParamsToString:(NSString*) path - queryParams:(NSDictionary*) queryParams { +- (NSString*) pathWithQueryParamsToString:(NSString*) path queryParams:(NSDictionary*) queryParams { if(queryParams.count == 0) { return path; } @@ -434,9 +322,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { /** * Update header and query params based on authentication settings */ -- (void) updateHeaderParams:(NSDictionary *__autoreleasing *)headers - queryParams:(NSDictionary *__autoreleasing *)querys - WithAuthSettings:(NSArray *)authSettings { +- (void) updateHeaderParams:(NSDictionary * *)headers queryParams:(NSDictionary * *)querys WithAuthSettings:(NSArray *)authSettings { if ([authSettings count] == 0) { return; @@ -466,7 +352,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { *querys = [NSDictionary dictionaryWithDictionary:querysWithAuth]; } -- (AFSecurityPolicy *) customSecurityPolicy { +- (AFSecurityPolicy *) createSecurityPolicy { AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; id config = self.configuration; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m index 225d24155eb..705580e9a54 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.m @@ -36,7 +36,7 @@ _mutableApiKey = [NSMutableDictionary dictionary]; _mutableApiKeyPrefix = [NSMutableDictionary dictionary]; _mutableDefaultHeaders = [NSMutableDictionary dictionary]; - ; + _logger = [SWGLogger sharedLogger]; } return self; @@ -129,8 +129,6 @@ self.logger.enabled = debug; } - - - (void)setDefaultHeaderValue:(NSString *)value forKey:(NSString *)key { if(!value) { [self.mutableDefaultHeaders removeObjectForKey:key]; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.h deleted file mode 100644 index 20535a6b92e..00000000000 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.h +++ /dev/null @@ -1,30 +0,0 @@ -#import -#import - -/** -* Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters -* -* OpenAPI spec version: 1.0.0 -* Contact: apiteam@wordnik.com -* -* NOTE: This class is auto generated by the swagger code generator program. -* https://github.com/swagger-api/swagger-codegen.git -* Do not edit the class manually. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -@interface SWGJSONResponseSerializer : AFJSONResponseSerializer - -@end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.m deleted file mode 100644 index 73c696d341a..00000000000 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.m +++ /dev/null @@ -1,39 +0,0 @@ -#import "SWGJSONResponseSerializer.h" - -@implementation SWGJSONResponseSerializer - -/// -/// When customize a response serializer, -/// the serializer must conform the protocol `AFURLResponseSerialization` -/// and implements the protocol method `responseObjectForResponse:error:` -/// -/// @param response The response to be processed. -/// @param data The response data to be decoded. -/// @param error The error that occurred while attempting to decode the response data. -/// -/// @return The object decoded from the specified response data. -/// -- (id) responseObjectForResponse:(NSURLResponse *)response - data:(NSData *)data - error:(NSError *__autoreleasing *)error { - NSDictionary *responseJson = [super responseObjectForResponse:response data:data error:error]; - - // if response data is not a valid json, return string of data. - if ([self isParseError:*error]) { - *error = nil; - NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - return responseString; - } - - return responseJson; -} - --(BOOL)isParseError:(NSError *)error { - return [error.domain isEqualToString:NSCocoaErrorDomain] && error.code == 3840; -} - -+ (instancetype)serializer { - return [self serializerWithReadingOptions:NSJSONReadingAllowFragments]; -} - -@end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGLogger.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGLogger.m index 322ae9678d7..2a96e5ec54d 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGLogger.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGLogger.m @@ -17,8 +17,7 @@ #pragma mark - Log Methods -- (void)debugLog:(NSString *)method - message:(NSString *)format, ... { +- (void)debugLog:(NSString *)method message:(NSString *)format, ... { if (!self.isEnabled) { return; } diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.m index a0efd1d5927..e38aeb9b63f 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.m @@ -16,6 +16,7 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; @property (nonatomic, strong) NSNumberFormatter* numberFormatter; @property (nonatomic, strong) NSArray *primitiveTypes; @property (nonatomic, strong) NSArray *basicReturnTypes; +@property (nonatomic, strong) NSArray *dataReturnTypes; @property (nonatomic, strong) NSRegularExpression* arrayOfModelsPatExpression; @property (nonatomic, strong) NSRegularExpression* arrayOfPrimitivesPatExpression; @@ -33,7 +34,9 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; formatter.numberStyle = NSNumberFormatterDecimalStyle; _numberFormatter = formatter; _primitiveTypes = @[@"NSString", @"NSDate", @"NSNumber"]; - _basicReturnTypes = @[@"NSObject", @"id", @"NSData"]; + _basicReturnTypes = @[@"NSObject", @"id"]; + _dataReturnTypes = @[@"NSData"]; + _arrayOfModelsPatExpression = [NSRegularExpression regularExpressionWithPattern:@"NSArray<(.+)>" options:NSRegularExpressionCaseInsensitive error:nil]; @@ -53,23 +56,36 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; #pragma mark - Deserialize methods - (id) deserialize:(id) data class:(NSString *) className error:(NSError **) error { - // return nil if data is nil or className is nil - if (!data || !className || [data isKindOfClass:[NSNull class]]) { + if (!data || !className) { return nil; } - // remove "*" from className, if ends with "*" if ([className hasSuffix:@"*"]) { className = [className substringToIndex:[className length] - 1]; } + if([self.dataReturnTypes containsObject:className]) { + return data; + } + id jsonData = nil; + if([data isKindOfClass:[NSData class]]) { + jsonData = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:error]; + } else { + jsonData = data; + } + if(!jsonData) { + jsonData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + } else if([jsonData isKindOfClass:[NSNull class]]) { + return nil; + } + // pure object if ([self.basicReturnTypes containsObject:className]) { - return data; + return jsonData; } // primitives if ([self.primitiveTypes containsObject:className]) { - return [self deserializePrimitiveValue:data class:className error:error]; + return [self deserializePrimitiveValue:jsonData class:className error:error]; } NSTextCheckingResult *match = nil; @@ -78,37 +94,37 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; match = [self.arrayOfModelsPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *innerType = [className substringWithRange:[match rangeAtIndex:1]]; - return [self deserializeArrayValue:data innerType:innerType error:error]; + return [self deserializeArrayValue:jsonData innerType:innerType error:error]; } // list of primitives match = [self.arrayOfPrimitivesPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *innerType = [className substringWithRange:[match rangeAtIndex:1]]; - return [self deserializeArrayValue:data innerType:innerType error:error]; + return [self deserializeArrayValue:jsonData innerType:innerType error:error]; } // map match = [self.dictPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *valueType = [className substringWithRange:[match rangeAtIndex:2]]; - return [self deserializeDictionaryValue:data valueType:valueType error:error]; + return [self deserializeDictionaryValue:jsonData valueType:valueType error:error]; } match = [self.dictModelsPatExpression firstMatchInString:className options:0 range:range]; if (match) { NSString *valueType = [className substringWithRange:[match rangeAtIndex:2]]; - return [self deserializeDictionaryValue:data valueType:valueType error:error]; + return [self deserializeDictionaryValue:jsonData valueType:valueType error:error]; } // model Class ModelClass = NSClassFromString(className); if ([ModelClass instancesRespondToSelector:@selector(initWithDictionary:error:)]) { - return [(JSONModel *) [ModelClass alloc] initWithDictionary:data error:error]; + return [(JSONModel *) [ModelClass alloc] initWithDictionary:jsonData error:error]; } if(error) { - *error = [self unknownResponseErrorWithExpectedType:className data:data]; + *error = [self unknownResponseErrorWithExpectedType:className data:jsonData]; } return nil; } @@ -172,7 +188,7 @@ NSInteger const SWGUnknownResponseObjectErrorCode = 143528; - (id) deserializePrimitiveValue:(id) data class:(NSString *) className error:(NSError**)error { if ([className isEqualToString:@"NSString"]) { - return [NSString stringWithString:data]; + return [NSString stringWithFormat:@"%@",data]; } else if ([className isEqualToString:@"NSDate"]) { return [self deserializeDateValue:data error:error]; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.h index 59699c2bdd5..d934882a7b1 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.h @@ -26,6 +26,8 @@ extern NSString * SWGPercentEscapedStringFromString(NSString *string); +extern NSString * const kSWGApplicationJSONType; + @protocol SWGSanitizer /** diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.m index a74f72afbe3..49ff6ed014a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.m @@ -3,6 +3,8 @@ #import "SWGQueryParamCollection.h" #import +NSString * const kSWGApplicationJSONType = @"application/json"; + NSString * SWGPercentEscapedStringFromString(NSString *string) { static NSString * const kSWGCharactersGeneralDelimitersToEncode = @":#[]@"; static NSString * const kSWGCharactersSubDelimitersToEncode = @"!$&'()*+,;="; @@ -43,8 +45,6 @@ NSString * SWGPercentEscapedStringFromString(NSString *string) { @implementation SWGSanitizer -static NSString * kApplicationJSONType = @"application/json"; - -(instancetype)init { self = [super init]; if ( !self ) { @@ -141,7 +141,7 @@ static NSString * kApplicationJSONType = @"application/json"; NSMutableArray *lowerAccepts = [[NSMutableArray alloc] initWithCapacity:[accepts count]]; for (NSString *string in accepts) { if ([self.jsonHeaderTypeExpression matchesInString:string options:0 range:NSMakeRange(0, [string length])].count > 0) { - return kApplicationJSONType; + return kSWGApplicationJSONType; } [lowerAccepts addObject:[string lowercaseString]]; } @@ -153,12 +153,12 @@ static NSString * kApplicationJSONType = @"application/json"; */ - (NSString *) selectHeaderContentType:(NSArray *)contentTypes { if (contentTypes.count == 0) { - return kApplicationJSONType; + return kSWGApplicationJSONType; } NSMutableArray *lowerContentTypes = [[NSMutableArray alloc] initWithCapacity:[contentTypes count]]; for (NSString *string in contentTypes) { if([self.jsonHeaderTypeExpression matchesInString:string options:0 range:NSMakeRange(0, [string length])].count > 0){ - return kApplicationJSONType; + return kSWGApplicationJSONType; } [lowerContentTypes addObject:[string lowercaseString]]; } diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/Tests/DeserializationTest.m b/samples/client/petstore/objc/default/SwaggerClientTests/Tests/DeserializationTest.m index 6077ab42981..d24f349419c 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/Tests/DeserializationTest.m +++ b/samples/client/petstore/objc/default/SwaggerClientTests/Tests/DeserializationTest.m @@ -250,4 +250,16 @@ XCTAssertTrue([result isEqual:@NO]); } +- (void)testDeserializeStringData { + NSString *data = @"1233"; + + NSError* error; + NSString * returnValue = [apiClient.responseDeserializer deserialize:[data dataUsingEncoding:NSUTF8StringEncoding] class:@"NSString*" error:&error]; + XCTAssertTrue([returnValue isEqual:data]); + + NSNumber *returnNumber = [apiClient.responseDeserializer deserialize:[data dataUsingEncoding:NSUTF8StringEncoding] class:@"NSNumber*" error:&error]; + XCTAssertTrue([returnNumber isEqual:@1233]); +} + + @end diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/Tests/UserApiTest.m b/samples/client/petstore/objc/default/SwaggerClientTests/Tests/UserApiTest.m index e9123647b75..dd895d705aa 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/Tests/UserApiTest.m +++ b/samples/client/petstore/objc/default/SwaggerClientTests/Tests/UserApiTest.m @@ -30,14 +30,7 @@ if (!output) { XCTFail(@"response can't be nil"); } - - NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"logged in user" - options:0 - error:nil]; - NSTextCheckingResult *match = [regex firstMatchInString:output - options:0 - range:NSMakeRange(0, [output length])]; - XCTAssertNotNil(match); + XCTAssertTrue([output rangeOfString:@"logged in user"].location != NSNotFound); [expectation fulfill]; }]; From 8b967239c4829b853ac5035dd52e71357336777b Mon Sep 17 00:00:00 2001 From: akhilkedia94 Date: Mon, 29 Aug 2016 13:38:12 +0900 Subject: [PATCH 004/182] [Issue #3076] [Tizen] Updating the Tizen Client Generation Code Updated Tizen Client Codegen to remove calls to obsolete/deprecated system APIs. The new templates are based on json-glib and libcurl. The produced code also contains scripts for auto-generation of the documentation of the produced client library using Doxygen. Included test cases for Petstore in /samples/client/petstore/tizen/PetStoreTest/ Signed-off-by: akhilkedia94 --- .../codegen/languages/TizenClientCodegen.java | 183 +- .../main/resources/tizen/Doxyfile.mustache | 2313 +++++++++++++++++ .../src/main/resources/tizen/README.md | 2 - .../main/resources/tizen/api-body.mustache | 420 ++- .../main/resources/tizen/api-header.mustache | 71 +- .../resources/tizen/apiclient-body.mustache | 124 - .../resources/tizen/apiclient-header.mustache | 73 - .../main/resources/tizen/doc-readme.mustache | 48 + .../main/resources/tizen/error-body.mustache | 69 +- .../resources/tizen/error-header.mustache | 46 +- .../tizen/generateDocumentation.mustache | 4 + .../resources/tizen/helpers-body.mustache | 603 +++-- .../resources/tizen/helpers-header.mustache | 55 +- .../main/resources/tizen/model-body.mustache | 306 ++- .../resources/tizen/model-header.mustache | 81 +- .../resources/tizen/modelFactory.mustache | 31 - .../resources/tizen/netclient-body.mustache | 359 +++ .../resources/tizen/netclient-header.mustache | 53 + .../src/main/resources/tizen/object.mustache | 41 +- .../main/resources/tizen/requestinfo.mustache | 66 + .../tizen/PetStoreTest/CMakeLists.txt | 25 + .../tizen/PetStoreTest/src/PetStoreTest.cpp | 104 + .../tizen/PetStoreTest/src/PetStoreTest.h | 38 + .../petstore/tizen/PetStoreTest/src/main.cpp | 27 + .../petstore/tizen/client/SamiApiClient.cpp | 124 - .../petstore/tizen/client/SamiApiClient.h | 73 - .../petstore/tizen/client/SamiApiResponse.cpp | 203 -- .../petstore/tizen/client/SamiApiResponse.h | 59 - .../petstore/tizen/client/SamiCategory.cpp | 176 -- .../petstore/tizen/client/SamiCategory.h | 56 - .../petstore/tizen/client/SamiError.cpp | 55 - .../client/petstore/tizen/client/SamiError.h | 35 - .../petstore/tizen/client/SamiHelpers.cpp | 273 -- .../petstore/tizen/client/SamiHelpers.h | 45 - .../petstore/tizen/client/SamiModelFactory.h | 51 - .../client/petstore/tizen/client/SamiObject.h | 27 - .../petstore/tizen/client/SamiOrder.cpp | 284 -- .../client/petstore/tizen/client/SamiOrder.h | 71 - .../client/petstore/tizen/client/SamiPet.cpp | 284 -- .../client/petstore/tizen/client/SamiPet.h | 71 - .../petstore/tizen/client/SamiPetApi.cpp | 438 ---- .../client/petstore/tizen/client/SamiPetApi.h | 50 - .../petstore/tizen/client/SamiStoreApi.cpp | 243 -- .../petstore/tizen/client/SamiStoreApi.h | 41 - .../client/petstore/tizen/client/SamiTag.cpp | 176 -- .../client/petstore/tizen/client/SamiTag.h | 56 - .../client/petstore/tizen/client/SamiUser.cpp | 338 --- .../client/petstore/tizen/client/SamiUser.h | 75 - .../petstore/tizen/client/SamiUserApi.cpp | 408 --- .../petstore/tizen/client/SamiUserApi.h | 48 - samples/client/petstore/tizen/doc/Doxyfile | 2313 +++++++++++++++++ samples/client/petstore/tizen/doc/README.md | 74 + .../tizen/doc/generateDocumentation.sh | 4 + .../client/petstore/tizen/src/ApiResponse.cpp | 196 ++ .../client/petstore/tizen/src/ApiResponse.h | 90 + .../client/petstore/tizen/src/Category.cpp | 156 ++ samples/client/petstore/tizen/src/Category.h | 82 + samples/client/petstore/tizen/src/Error.cpp | 74 + samples/client/petstore/tizen/src/Error.h | 49 + samples/client/petstore/tizen/src/Helpers.cpp | 395 +++ samples/client/petstore/tizen/src/Helpers.h | 46 + .../client/petstore/tizen/src/NetClient.cpp | 375 +++ samples/client/petstore/tizen/src/NetClient.h | 69 + samples/client/petstore/tizen/src/Object.h | 42 + samples/client/petstore/tizen/src/Order.cpp | 316 +++ samples/client/petstore/tizen/src/Order.h | 114 + samples/client/petstore/tizen/src/Pet.cpp | 370 +++ samples/client/petstore/tizen/src/Pet.h | 117 + .../client/petstore/tizen/src/PetManager.cpp | 1187 +++++++++ .../client/petstore/tizen/src/PetManager.h | 254 ++ .../client/petstore/tizen/src/RequestInfo.h | 82 + .../petstore/tizen/src/StoreManager.cpp | 620 +++++ .../client/petstore/tizen/src/StoreManager.h | 142 + samples/client/petstore/tizen/src/Tag.cpp | 156 ++ samples/client/petstore/tizen/src/Tag.h | 82 + samples/client/petstore/tizen/src/User.cpp | 396 +++ samples/client/petstore/tizen/src/User.h | 130 + .../client/petstore/tizen/src/UserManager.cpp | 1187 +++++++++ .../client/petstore/tizen/src/UserManager.h | 246 ++ 79 files changed, 13514 insertions(+), 4752 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/tizen/Doxyfile.mustache delete mode 100644 modules/swagger-codegen/src/main/resources/tizen/README.md delete mode 100644 modules/swagger-codegen/src/main/resources/tizen/apiclient-body.mustache delete mode 100644 modules/swagger-codegen/src/main/resources/tizen/apiclient-header.mustache create mode 100644 modules/swagger-codegen/src/main/resources/tizen/doc-readme.mustache create mode 100755 modules/swagger-codegen/src/main/resources/tizen/generateDocumentation.mustache delete mode 100644 modules/swagger-codegen/src/main/resources/tizen/modelFactory.mustache create mode 100644 modules/swagger-codegen/src/main/resources/tizen/netclient-body.mustache create mode 100644 modules/swagger-codegen/src/main/resources/tizen/netclient-header.mustache create mode 100644 modules/swagger-codegen/src/main/resources/tizen/requestinfo.mustache create mode 100644 samples/client/petstore/tizen/PetStoreTest/CMakeLists.txt create mode 100644 samples/client/petstore/tizen/PetStoreTest/src/PetStoreTest.cpp create mode 100644 samples/client/petstore/tizen/PetStoreTest/src/PetStoreTest.h create mode 100644 samples/client/petstore/tizen/PetStoreTest/src/main.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiApiClient.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiApiClient.h delete mode 100644 samples/client/petstore/tizen/client/SamiApiResponse.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiApiResponse.h delete mode 100644 samples/client/petstore/tizen/client/SamiCategory.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiCategory.h delete mode 100644 samples/client/petstore/tizen/client/SamiError.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiError.h delete mode 100644 samples/client/petstore/tizen/client/SamiHelpers.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiHelpers.h delete mode 100644 samples/client/petstore/tizen/client/SamiModelFactory.h delete mode 100644 samples/client/petstore/tizen/client/SamiObject.h delete mode 100644 samples/client/petstore/tizen/client/SamiOrder.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiOrder.h delete mode 100644 samples/client/petstore/tizen/client/SamiPet.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiPet.h delete mode 100644 samples/client/petstore/tizen/client/SamiPetApi.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiPetApi.h delete mode 100644 samples/client/petstore/tizen/client/SamiStoreApi.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiStoreApi.h delete mode 100644 samples/client/petstore/tizen/client/SamiTag.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiTag.h delete mode 100644 samples/client/petstore/tizen/client/SamiUser.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiUser.h delete mode 100644 samples/client/petstore/tizen/client/SamiUserApi.cpp delete mode 100644 samples/client/petstore/tizen/client/SamiUserApi.h create mode 100644 samples/client/petstore/tizen/doc/Doxyfile create mode 100644 samples/client/petstore/tizen/doc/README.md create mode 100755 samples/client/petstore/tizen/doc/generateDocumentation.sh create mode 100644 samples/client/petstore/tizen/src/ApiResponse.cpp create mode 100644 samples/client/petstore/tizen/src/ApiResponse.h create mode 100644 samples/client/petstore/tizen/src/Category.cpp create mode 100644 samples/client/petstore/tizen/src/Category.h create mode 100644 samples/client/petstore/tizen/src/Error.cpp create mode 100644 samples/client/petstore/tizen/src/Error.h create mode 100644 samples/client/petstore/tizen/src/Helpers.cpp create mode 100644 samples/client/petstore/tizen/src/Helpers.h create mode 100644 samples/client/petstore/tizen/src/NetClient.cpp create mode 100644 samples/client/petstore/tizen/src/NetClient.h create mode 100644 samples/client/petstore/tizen/src/Object.h create mode 100644 samples/client/petstore/tizen/src/Order.cpp create mode 100644 samples/client/petstore/tizen/src/Order.h create mode 100644 samples/client/petstore/tizen/src/Pet.cpp create mode 100644 samples/client/petstore/tizen/src/Pet.h create mode 100644 samples/client/petstore/tizen/src/PetManager.cpp create mode 100644 samples/client/petstore/tizen/src/PetManager.h create mode 100644 samples/client/petstore/tizen/src/RequestInfo.h create mode 100644 samples/client/petstore/tizen/src/StoreManager.cpp create mode 100644 samples/client/petstore/tizen/src/StoreManager.h create mode 100644 samples/client/petstore/tizen/src/Tag.cpp create mode 100644 samples/client/petstore/tizen/src/Tag.h create mode 100644 samples/client/petstore/tizen/src/User.cpp create mode 100644 samples/client/petstore/tizen/src/User.h create mode 100644 samples/client/petstore/tizen/src/UserManager.cpp create mode 100644 samples/client/petstore/tizen/src/UserManager.h diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TizenClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TizenClientCodegen.java index 3327972665d..3928a9316be 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TizenClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TizenClientCodegen.java @@ -25,17 +25,15 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.commons.lang3.StringUtils; public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig { - protected static String PREFIX = "Sami"; - protected Set foundationClasses = new HashSet(); - protected String sourceFolder = "client"; - protected Map namespaces = new HashMap(); + protected static String PREFIX = "ArtikCloud"; + protected String sourceFolder = "src"; + protected String documentationFolder = "doc"; public TizenClientCodegen() { super(); - outputFolder = "generated-code/tizen"; + outputFolder = ""; modelTemplateFiles.put("model-header.mustache", ".h"); modelTemplateFiles.put("model-body.mustache", ".cpp"); apiTemplateFiles.put("api-header.mustache", ".h"); @@ -47,70 +45,71 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig Arrays.asList( "bool", "int", - "long") + "long long", + "double", + "float") + ); + languageSpecificPrimitives = new HashSet( + Arrays.asList( + "bool", + "int", + "long long", + "double", + "float", + "std::string") ); - languageSpecificPrimitives = new HashSet(); additionalProperties().put("prefix", PREFIX); setReservedWordsLowerCase( - // VERIFY Arrays.asList( - "void", "char", "short", "int", "void", "char", "short", "int", - "long", "float", "double", "signed", "unsigned", "id", "const", - "volatile", "in", "out", "inout", "bycopy", "byref", "oneway", - "self", "super" + "alignas", "alignof", "and", "and_eq", "asm", "atomic_cancel", "atomic_commit", "atomic_noexcept", + "auto", "bitand", "bitor", "bool", "break", "case", "catch", "char", "char16_t", "char32_t", + "class", "compl", "concept", "const", "constexpr", "const_cast", "continue", "decltype", "default", + "delete", "do", "double", "dynamic_cast", "else", "enum", "explicit", "export", "extern", "false", + "float", "for", "friend", "goto", "if", "inline", "int", "import", "long", "module", "mutable", + "namespace", "new", "noexcept", "not", "not_eq", "nullptr", "operator", "or", "or_eq", "private", + "protected", "public", "register", "reinterpret_cast", "requires", "return", "short", "signed", + "sizeof", "static", "static_assert", "static_cast", "struct", "switch", "synchronized", "template", + "this", "thread_local", "throw", "true", "try", "typedef", "typeid", "typename", "union", + "unsigned", "using", "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq" )); super.typeMapping = new HashMap(); - typeMapping.put("Date", "DateTime"); - typeMapping.put("DateTime", "DateTime"); - typeMapping.put("string", "String"); - typeMapping.put("integer", "Integer"); - typeMapping.put("float", "Float"); - typeMapping.put("long", "Long"); - typeMapping.put("boolean", "Boolean"); - typeMapping.put("double", "Double"); - typeMapping.put("array", "IList"); - typeMapping.put("map", "HashMap"); - typeMapping.put("number", "Long"); - typeMapping.put("object", PREFIX + "Object"); - //TODO binary should be mapped to byte array - // mapped to String as a workaround - typeMapping.put("binary", "String"); + //typeMapping.put("Date", "DateTime"); + //typeMapping.put("DateTime", "DateTime"); + typeMapping.put("string", "std::string"); + typeMapping.put("integer", "int"); + typeMapping.put("float", "float"); + typeMapping.put("long", "long long"); + typeMapping.put("boolean", "bool"); + typeMapping.put("double", "double"); + typeMapping.put("array", "std::list"); + typeMapping.put("map", "std::map"); + typeMapping.put("number", "long long"); + typeMapping.put("object", "std::string"); + typeMapping.put("binary", "std::string"); + typeMapping.put("password", "std::string"); + //TODO:Maybe use better formats for dateTime? + typeMapping.put("file", "std::string"); + typeMapping.put("DateTime", "std::string"); + typeMapping.put("Date", "std::string"); importMapping = new HashMap(); - namespaces = new HashMap(); - namespaces.put("DateTime", "Tizen::Base::DateTime"); - namespaces.put("Integer", "Tizen::Base::Integer"); - namespaces.put("Long", "Tizen::Base::Long"); - namespaces.put("Boolean", "Tizen::Base::Boolean"); - namespaces.put("Float", "Tizen::Base::Float"); - namespaces.put("String", "Tizen::Base::String"); - namespaces.put("Double", "Tizen::Base::Double"); - namespaces.put("IList", "Tizen::Base::Collection::IList"); - namespaces.put("HashMap", "Tizen::Base::Collection::HashMap"); - namespaces.put("ArrayList", "Tizen::Base::Collection::ArrayList"); - namespaces.put("JsonNumber", "Tizen::Web::Json"); - namespaces.put("JsonString", "Tizen::Web::Json"); - - foundationClasses = new HashSet( - Arrays.asList( - "String", - "Integer", - "Float") - ); supportingFiles.clear(); - supportingFiles.add(new SupportingFile("modelFactory.mustache", sourceFolder, PREFIX + "ModelFactory.h")); - supportingFiles.add(new SupportingFile("helpers-header.mustache", sourceFolder, PREFIX + "Helpers.h")); - supportingFiles.add(new SupportingFile("helpers-body.mustache", sourceFolder, PREFIX + "Helpers.cpp")); - supportingFiles.add(new SupportingFile("apiclient-header.mustache", sourceFolder, PREFIX + "ApiClient.h")); - supportingFiles.add(new SupportingFile("apiclient-body.mustache", sourceFolder, PREFIX + "ApiClient.cpp")); - supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, PREFIX + "Object.h")); - supportingFiles.add(new SupportingFile("error-header.mustache", sourceFolder, PREFIX + "Error.h")); - supportingFiles.add(new SupportingFile("error-body.mustache", sourceFolder, PREFIX + "Error.cpp")); + supportingFiles.add(new SupportingFile("helpers-header.mustache", sourceFolder, "Helpers.h")); + supportingFiles.add(new SupportingFile("helpers-body.mustache", sourceFolder, "Helpers.cpp")); + supportingFiles.add(new SupportingFile("netclient-header.mustache", sourceFolder, "NetClient.h")); + supportingFiles.add(new SupportingFile("netclient-body.mustache", sourceFolder, "NetClient.cpp")); + supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, "Object.h")); + supportingFiles.add(new SupportingFile("requestinfo.mustache", sourceFolder, "RequestInfo.h")); + supportingFiles.add(new SupportingFile("error-header.mustache", sourceFolder, "Error.h")); + supportingFiles.add(new SupportingFile("error-body.mustache", sourceFolder, "Error.cpp")); + supportingFiles.add(new SupportingFile("Doxyfile.mustache", documentationFolder, "Doxyfile")); + supportingFiles.add(new SupportingFile("generateDocumentation.mustache", documentationFolder, "generateDocumentation.sh")); + supportingFiles.add(new SupportingFile("doc-readme.mustache", documentationFolder, "README.md")); } @Override @@ -141,10 +140,10 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig @Override public String getTypeDeclaration(String name) { - if (languageSpecificPrimitives.contains(name) && !foundationClasses.contains(name)) { + if (languageSpecificPrimitives.contains(name)) { return name; } else { - return name + "*"; + return name + ""; } } @@ -154,7 +153,7 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig String type = null; if (typeMapping.containsKey(swaggerType)) { type = typeMapping.get(swaggerType); - if (languageSpecificPrimitives.contains(type) && !foundationClasses.contains(type)) { + if (languageSpecificPrimitives.contains(type)) { return toModelName(type); } } else { @@ -166,10 +165,10 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig @Override public String getTypeDeclaration(Property p) { String swaggerType = getSwaggerType(p); - if (languageSpecificPrimitives.contains(swaggerType) && !foundationClasses.contains(swaggerType)) { + if (languageSpecificPrimitives.contains(swaggerType)) { return toModelName(swaggerType); } else { - return swaggerType + "*"; + return swaggerType + ""; } } @@ -177,48 +176,48 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig public String toModelName(String type) { if (typeMapping.keySet().contains(type) || typeMapping.values().contains(type) || - foundationClasses.contains(type) || importMapping.values().contains(type) || defaultIncludes.contains(type) || languageSpecificPrimitives.contains(type)) { return type; } else { - return PREFIX + Character.toUpperCase(type.charAt(0)) + type.substring(1); + return Character.toUpperCase(type.charAt(0)) + type.substring(1); } } @Override public String toModelImport(String name) { - if (namespaces.containsKey(name)) { - return "using " + namespaces.get(name) + ";"; + if (name.equals("std::string")) { + return "#include "; + } else if (name.equals("std::map")) { + return "#include "; + } else if (name.equals("std::list")) { + return "#include "; } return "#include \"" + name + ".h\""; } + //Might not be needed @Override public String toDefaultValue(Property p) { if (p instanceof StringProperty) { - return "new String()"; + return "std::string()"; } else if (p instanceof BooleanProperty) { - return "new Boolean(false)"; - } else if (p instanceof DateProperty) { - return "new DateTime()"; - } else if (p instanceof DateTimeProperty) { - return "new DateTime()"; + return "bool(false)"; } else if (p instanceof DoubleProperty) { - return "new Double()"; + return "double(0)"; } else if (p instanceof FloatProperty) { - return "new Float()"; + return "float(0)"; } else if (p instanceof IntegerProperty) { - return "new Integer()"; + return "int(0)"; } else if (p instanceof LongProperty) { - return "new Long()"; + return "long(0)"; } else if (p instanceof DecimalProperty) { - return "new Long()"; + return "long(0)"; } else if (p instanceof MapProperty) { - return "new HashMap()"; + return "new std::map()"; } else if (p instanceof ArrayProperty) { - return "new ArrayList()"; + return "new std::list()"; } // else if (p instanceof RefProperty) { @@ -228,6 +227,7 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig return "null"; } + @Override public String apiFileFolder() { return outputFolder + File.separator + sourceFolder; @@ -240,24 +240,27 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig @Override public String toModelFilename(String name) { - return PREFIX + initialCaps(name); + return initialCaps(name); } @Override public String toApiName(String name) { - return PREFIX + initialCaps(name) + "Api"; + return initialCaps(name) + "Manager"; } @Override public String toApiFilename(String name) { - return PREFIX + initialCaps(name) + "Api"; + return initialCaps(name) + "Manager"; } @Override public String toVarName(String name) { String paramName = name.replaceAll("[^a-zA-Z0-9_]", ""); - paramName = Character.toUpperCase(paramName.charAt(0)) + paramName.substring(1); - return "p" + paramName; + paramName = Character.toLowerCase(paramName.charAt(0)) + paramName.substring(1); + if (isReservedWord(paramName)) { + return escapeReservedWord(paramName); + } + return "" + paramName; } @Override @@ -268,27 +271,17 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig @Override public String toOperationId(String operationId) { // throw exception if method name is empty - if (StringUtils.isEmpty(operationId)) { + if (operationId=="") { throw new RuntimeException("Empty method name (operationId) not allowed"); } // method name cannot use reserved keyword, e.g. return$ if (isReservedWord(operationId)) { - throw new RuntimeException(operationId + " (reserved word) cannot be used as method name"); + operationId = escapeReservedWord(operationId); } // add_pet_by_id => addPetById return camelize(operationId, true); } - @Override - public String escapeQuotationMark(String input) { - // remove " to avoid code injection - return input.replace("\"", ""); - } - - @Override - public String escapeUnsafeCharacters(String input) { - return input.replace("*/", "*_/").replace("/*", "/_*"); - } } diff --git a/modules/swagger-codegen/src/main/resources/tizen/Doxyfile.mustache b/modules/swagger-codegen/src/main/resources/tizen/Doxyfile.mustache new file mode 100644 index 00000000000..af114f74cdb --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/tizen/Doxyfile.mustache @@ -0,0 +1,2313 @@ +# Doxyfile 1.8.6 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = {{#swagger}}{{#info}}"{{title}} {{version}} Tizen SDK"{{/info}}{{/swagger}} + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = {{#swagger}}{{#info}}{{version}}{{/info}}{{/swagger}} + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "An SDK for creating client applications for {{#swagger}}{{#info}}{{title}}{{/info}}{{/swagger}} on Tizen Platform (http://tizen.org/)" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = "./doc/logo.png" + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = "./doc/SDK" + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = YES + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = ./src ./include + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.h *.cpp + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = YES + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /