forked from loafle/openapi-generator-original
updates templates according to https://github.com/NYTimes/objective-c-style-guide
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Swagger Codegen for the objcSessionManager library
|
||||
# Swagger Codegen for the ObjcSessionManager library
|
||||
|
||||
## Overview
|
||||
This is a boiler-plate project to generate your own client library with Swagger. It's goal is
|
||||
@@ -21,9 +21,9 @@ At this point, you've likely generated a client setup. It will include somethin
|
||||
|-- src
|
||||
|--- main
|
||||
|---- java
|
||||
|----- com.diamonddogs.codegen.ObjcsessionmanagerGenerator.java // generator file
|
||||
|----- io.swagger.codegen.languages.ObjcsessionmanagerGenerator.java // generator file
|
||||
|---- resources
|
||||
|----- objcSessionManager // template files
|
||||
|----- ObjcSessionManager // template files
|
||||
|----- META-INF
|
||||
|------ services
|
||||
|------- io.swagger.codegen.CodegenConfig
|
||||
@@ -35,7 +35,7 @@ You _will_ need to make changes in at least the following:
|
||||
|
||||
Templates in this folder:
|
||||
|
||||
`src/main/resources/objcSessionManager`
|
||||
`src/main/resources/ObjcSessionManager`
|
||||
|
||||
Once modified, you can run this:
|
||||
|
||||
@@ -46,7 +46,7 @@ mvn package
|
||||
In your generator project. A single jar file will be produced in `target`. You can now use that with codegen:
|
||||
|
||||
```
|
||||
java -cp /path/to/swagger-codegen-distribution:/path/to/your/jar io.swagger.codegen.Codegen -l objcSessionManager -o ./test
|
||||
java -cp /path/to/swagger-codegen-distribution:/path/to/your/jar io.swagger.codegen.Codegen -l ObjcSessionManager -o ./test
|
||||
```
|
||||
|
||||
Now your templates are available to the client generator and you can write output values
|
||||
@@ -67,7 +67,7 @@ the object you have available during client generation:
|
||||
# -DdebugOperations prints operations passed to the template engine
|
||||
# -DdebugSupportingFiles prints additional data passed to the template engine
|
||||
|
||||
java -DdebugOperations -cp /path/to/swagger-codegen-distribution:/path/to/your/jar io.swagger.codegen.Codegen -l objcSessionManager -o ./test
|
||||
java -DdebugOperations -cp /path/to/swagger-codegen-distribution:/path/to/your/jar io.swagger.codegen.Codegen -l ObjcSessionManager -o ./test
|
||||
```
|
||||
|
||||
Will, for example, output the debug info for operations. You can use this info
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>objcSessionManager-swagger-codegen</artifactId>
|
||||
<artifactId>ObjcSessionManager-swagger-codegen</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>objcSessionManager-swagger-codegen</name>
|
||||
<name>ObjcSessionManager-swagger-codegen</name>
|
||||
<version>1.0.0</version>
|
||||
<prerequisites>
|
||||
<maven>2.2.0</maven>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.diamonddogs.codegen;
|
||||
package io.swagger.codegen.languages;
|
||||
|
||||
import io.swagger.codegen.CliOption;
|
||||
import io.swagger.codegen.CodegenConfig;
|
||||
@@ -17,7 +17,7 @@ import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
public class ObjcsessionmanagerGenerator extends DefaultCodegen implements CodegenConfig {
|
||||
public class ObjcSessionManagerGenerator extends DefaultCodegen implements CodegenConfig {
|
||||
|
||||
public static final String CLASS_PREFIX = "classPrefix";
|
||||
public static final String POD_NAME = "podName";
|
||||
@@ -38,10 +38,10 @@ public class ObjcsessionmanagerGenerator extends DefaultCodegen implements Codeg
|
||||
|
||||
|
||||
|
||||
public ObjcsessionmanagerGenerator() {
|
||||
public ObjcSessionManagerGenerator() {
|
||||
super();
|
||||
|
||||
outputFolder = "generated-code" + File.separator + "objc-SessionManager";
|
||||
outputFolder = "generated-code" + File.separator + "ObjcSessionManager";
|
||||
|
||||
modelTemplateFiles.put("model-header.mustache", ".h");
|
||||
modelTemplateFiles.put("model-body.mustache", ".m");
|
||||
@@ -49,7 +49,7 @@ public class ObjcsessionmanagerGenerator extends DefaultCodegen implements Codeg
|
||||
apiTemplateFiles.put("api-header.mustache", ".h");
|
||||
apiTemplateFiles.put("api-body.mustache", ".m");
|
||||
|
||||
embeddedTemplateDir = templateDir = "objc-SessionManager";
|
||||
embeddedTemplateDir = templateDir = "ObjcSessionManager";
|
||||
|
||||
defaultIncludes.clear();
|
||||
defaultIncludes.add("bool");
|
||||
@@ -1 +1 @@
|
||||
com.diamonddogs.codegen.ObjcsessionmanagerGenerator
|
||||
io.swagger.codegen.languages.ObjcSessionManagerGenerator
|
||||
@@ -10,7 +10,7 @@
|
||||
#define {{classPrefix}}DebugLog(format, ...) [{{classPrefix}}ApiSessionManager debugLog:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__] message: format, ##__VA_ARGS__];
|
||||
|
||||
|
||||
NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}ResponseObject";
|
||||
NSString * const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}ResponseObject";
|
||||
|
||||
|
||||
@interface {{classPrefix}}ApiSessionManager ()
|
||||
@@ -21,37 +21,31 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
|
||||
@implementation {{classPrefix}}ApiSessionManager
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
NSLog(@"%s: %p", __PRETTY_FUNCTION__, self);
|
||||
}
|
||||
- (instancetype)init {
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
return [self initWithConfiguration:[{{classPrefix}}DefaultConfiguration sharedConfiguration]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url
|
||||
{
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url {
|
||||
|
||||
return [self initWithBaseURL:url
|
||||
configuration:[{{classPrefix}}DefaultConfiguration sharedConfiguration]];
|
||||
|
||||
}
|
||||
|
||||
- (instancetype)initWithConfiguration:(id<{{classPrefix}}Configuration>)configuration
|
||||
{
|
||||
- (instancetype)initWithConfiguration:(id<{{classPrefix}}Configuration>)configuration {
|
||||
|
||||
return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url
|
||||
configuration:(id<{{classPrefix}}Configuration>)configuration
|
||||
{
|
||||
configuration:(id<{{classPrefix}}Configuration>)configuration {
|
||||
|
||||
self = [super initWithBaseURL:url];
|
||||
if (self)
|
||||
{
|
||||
if (self) {
|
||||
_configuration = configuration;
|
||||
}
|
||||
NSLog(@"%s: %p", __PRETTY_FUNCTION__, self);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -67,8 +61,8 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
requestContentType:(NSString *)requestContentType
|
||||
responseContentType:(NSString *)responseContentType
|
||||
responseType:(NSString *)responseType
|
||||
completionBlock:(void (^)(id, NSError *))completionBlock
|
||||
{
|
||||
completionBlock:(void (^)(id, NSError *))completionBlock {
|
||||
|
||||
// setting request serializer
|
||||
if ([requestContentType isEqualToString:@"application/json"]) {
|
||||
self.requestSerializer = [{{classPrefix}}JSONRequestSerializer serializer];
|
||||
@@ -151,12 +145,11 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
if (headerParams != nil && [headerParams count] > 0) {
|
||||
hasHeaderParams = true;
|
||||
}
|
||||
//if (offlineState) {
|
||||
|
||||
if (self.configuration.offlineState) {
|
||||
{{classPrefix}}DebugLog(@"%@ cache forced", resourcePath);
|
||||
[request setCachePolicy:NSURLRequestReturnCacheDataDontLoad];
|
||||
}
|
||||
//else if(!hasHeaderParams && [method isEqualToString:@"GET"] && cacheEnabled) {
|
||||
else if(!hasHeaderParams && [method isEqualToString:@"GET"] && self.configuration.cacheEnabled) {
|
||||
{{classPrefix}}DebugLog(@"%@ cache enabled", resourcePath);
|
||||
[request setCachePolicy:NSURLRequestUseProtocolCachePolicy];
|
||||
@@ -166,8 +159,8 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
[request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];
|
||||
}
|
||||
|
||||
if (hasHeaderParams){
|
||||
for(NSString * key in [headerParams keyEnumerator]){
|
||||
if (hasHeaderParams) {
|
||||
for(NSString * key in [headerParams keyEnumerator]) {
|
||||
[request setValue:[headerParams valueForKey:key] forHTTPHeaderField:key];
|
||||
}
|
||||
}
|
||||
@@ -303,7 +296,8 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
*querys = [NSDictionary dictionaryWithDictionary:querysWithAuth];
|
||||
}
|
||||
|
||||
- (id) sanitizeForSerialization:(id) object {
|
||||
- (id)sanitizeForSerialization:(id)object {
|
||||
|
||||
if (object == nil) {
|
||||
return nil;
|
||||
}
|
||||
@@ -345,7 +339,8 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
}
|
||||
}
|
||||
|
||||
- (id) deserialize:(id) data class:(NSString *) class {
|
||||
- (id)deserialize:(id)data class:(NSString *)class {
|
||||
|
||||
NSRegularExpression *regexp = nil;
|
||||
NSTextCheckingResult *match = nil;
|
||||
NSMutableArray *resultArray = nil;
|
||||
@@ -470,8 +465,9 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString*) pathWithQueryParamsToString:(NSString*) path
|
||||
queryParams:(NSDictionary*) queryParams {
|
||||
- (NSString *)pathWithQueryParamsToString:(NSString *)path
|
||||
queryParams:(NSDictionary *)queryParams {
|
||||
|
||||
NSString * separator = nil;
|
||||
int counter = 0;
|
||||
|
||||
@@ -525,7 +521,8 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
return requestUrl;
|
||||
}
|
||||
|
||||
- (NSString *) parameterToString:(id)param {
|
||||
- (NSString *)parameterToString:(id)param {
|
||||
|
||||
if ([param isKindOfClass:[NSString class]]) {
|
||||
return param;
|
||||
}
|
||||
@@ -556,7 +553,7 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
/*
|
||||
* Detect `Accept` from accepts
|
||||
*/
|
||||
+ (NSString *) selectHeaderAccept:(NSArray *)accepts {
|
||||
+ (NSString *)selectHeaderAccept:(NSArray *)accepts {
|
||||
if (accepts == nil || [accepts count] == 0) {
|
||||
return @"";
|
||||
}
|
||||
@@ -580,8 +577,7 @@ NSString *const {{classPrefix}}ResponseObjectErrorKey = @"{{classPrefix}}Respons
|
||||
/*
|
||||
* Detect `Content-Type` from contentTypes
|
||||
*/
|
||||
+ (NSString *) selectHeaderContentType:(NSArray *)contentTypes
|
||||
{
|
||||
+ (NSString *)selectHeaderContentType:(NSArray *)contentTypes {
|
||||
if (contentTypes == nil || [contentTypes count] == 0) {
|
||||
return @"application/json";
|
||||
}
|
||||
|
||||
@@ -37,18 +37,18 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey;
|
||||
*
|
||||
* @return The created session task.
|
||||
*/
|
||||
- (NSURLSessionTask *)requestWithCompletionBlock:(NSString*) path
|
||||
- (NSURLSessionTask *)requestWithCompletionBlock:(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
|
||||
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;
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey;
|
||||
*
|
||||
* @return The Accept header
|
||||
*/
|
||||
+(NSString *) selectHeaderAccept:(NSArray *)accepts;
|
||||
+ (NSString *)selectHeaderAccept:(NSArray *)accepts;
|
||||
|
||||
/**
|
||||
* Detects Content-Type header from contentTypes NSArray
|
||||
@@ -67,6 +67,6 @@ extern NSString *const {{classPrefix}}ResponseObjectErrorKey;
|
||||
*
|
||||
* @return The Content-Type header
|
||||
*/
|
||||
+(NSString *) selectHeaderContentType:(NSArray *)contentTypes;
|
||||
+ (NSString *)selectHeaderContentType:(NSArray *)contentTypes;
|
||||
|
||||
@end
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
@implementation {{classPrefix}}BasicAuthTokenProvider
|
||||
|
||||
+ (NSString *)createBasicAuthTokenWithUsername:(NSString *)username password:(NSString *)password
|
||||
{
|
||||
+ (NSString *)createBasicAuthTokenWithUsername:(NSString *)username password:(NSString *)password {
|
||||
|
||||
NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password];
|
||||
NSData *data = [basicAuthCredentials dataUsingEncoding:NSUTF8StringEncoding];
|
||||
basicAuthCredentials = [NSString stringWithFormat:@"Basic %@", [data base64EncodedStringWithOptions:0]];
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
#pragma mark - Singletion Methods
|
||||
|
||||
+ (instancetype) sharedConfiguration {
|
||||
+ (instancetype)sharedConfiguration {
|
||||
|
||||
static {{classPrefix}}DefaultConfiguration *shardConfig = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
@@ -15,7 +16,7 @@
|
||||
|
||||
#pragma mark - Initialize Methods
|
||||
|
||||
- (instancetype) init {
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_host = @"{{basePath}}";
|
||||
|
||||
@@ -15,13 +15,14 @@
|
||||
///
|
||||
- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
|
||||
withParameters:(id)parameters
|
||||
error:(NSError *__autoreleasing *)error
|
||||
{
|
||||
error:(NSError *__autoreleasing *)error {
|
||||
|
||||
// If the body data which will be serialized isn't NSArray or NSDictionary
|
||||
// then put the data in the http request body directly.
|
||||
if ([parameters isKindOfClass:[NSArray class]] || [parameters isKindOfClass:[NSDictionary class]]) {
|
||||
return [super requestBySerializingRequest:request withParameters:parameters error:error];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
NSMutableURLRequest *mutableRequest = [request mutableCopy];
|
||||
|
||||
if (parameters) {
|
||||
|
||||
@@ -21,9 +21,9 @@ static BOOL JSONParseError(NSError *error) {
|
||||
///
|
||||
/// @return The object decoded from the specified response data.
|
||||
///
|
||||
- (id) responseObjectForResponse:(NSURLResponse *)response
|
||||
data:(NSData *)data
|
||||
error:(NSError *__autoreleasing *)error {
|
||||
- (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.
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
@implementation JSONValueTransformer (ISO8601)
|
||||
|
||||
- (NSDate *) NSDateFromNSString:(NSString *)string
|
||||
{
|
||||
- (NSDate *)NSDateFromNSString:(NSString *)string {
|
||||
return [NSDate dateWithISO8601String:string];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
#import "{{classPrefix}}QueryParamCollection.h"
|
||||
|
||||
@interface {{classPrefix}}QueryParamCollection ()
|
||||
|
||||
@property (nonatomic, strong) NSArray * values;
|
||||
@property (nonatomic, strong) NSString * format;
|
||||
|
||||
@end
|
||||
|
||||
@implementation {{classPrefix}}QueryParamCollection
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
@interface {{classPrefix}}QueryParamCollection : NSObject
|
||||
|
||||
@property(nonatomic, readonly) NSArray* values;
|
||||
@property(nonatomic, readonly) NSString* format;
|
||||
@property (nonatomic, readonly) NSArray * values;
|
||||
@property (nonatomic, readonly) NSString * format;
|
||||
|
||||
- (id) initWithValuesAndFormat: (NSArray*) values
|
||||
format: (NSString*) format;
|
||||
- (id)initWithValuesAndFormat:(NSArray *)values
|
||||
format:(NSString *)format;
|
||||
|
||||
@end
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#pragma mark - Initialize methods
|
||||
|
||||
- (id) initWithSessionManager:({{classPrefix}}ApiSessionManager *)sessionManager {
|
||||
- (id)initWithSessionManager:({{classPrefix}}ApiSessionManager *)sessionManager {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_sessionManager = sessionManager;
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#pragma mark -
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key {
|
||||
- (void)addHeader:(NSString *)value forKey:(NSString *)key {
|
||||
[self.defaultHeaders setValue:value forKey:key];
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
///
|
||||
/// {{/allParams}} @returns {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
///
|
||||
-(NSURLSessionTask*) {{nickname}}WithCompletionBlock{{^allParams}}: {{/allParams}}{{#allParams}}{{#secondaryParam}} {{paramName}}{{/secondaryParam}}: ({{{dataType}}}) {{paramName}}
|
||||
- (NSURLSessionTask *){{nickname}}WithCompletionBlock{{^allParams}}: {{/allParams}}{{#allParams}}{{#secondaryParam}} {{paramName}}{{/secondaryParam}}: ({{{dataType}}}) {{paramName}}
|
||||
{{/allParams}}
|
||||
{{#returnBaseType}}{{#hasParams}}completionHandler: {{/hasParams}}(void (^)({{{returnType}}} output, NSError* error))completionBlock { {{/returnBaseType}}
|
||||
{{^returnBaseType}}{{#hasParams}}completionHandler: {{/hasParams}}(void (^)(NSError* error))completionBlock { {{/returnBaseType}}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
@property (nonatomic, strong, readonly) {{classPrefix}}ApiSessionManager *sessionManager;
|
||||
|
||||
-(instancetype) initWithSessionManager:({{classPrefix}}ApiSessionManager *)sessionManager;
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key;
|
||||
- (instancetype)initWithSessionManager:({{classPrefix}}ApiSessionManager *)sessionManager;
|
||||
- (void)addHeader:(NSString *)value forKey:(NSString *)key;
|
||||
|
||||
{{#operation}}
|
||||
///
|
||||
@@ -28,12 +28,12 @@
|
||||
/// {{/allParams}}
|
||||
///
|
||||
/// @return {{{returnType}}}
|
||||
-(NSURLSessionTask*) {{nickname}}WithCompletionBlock {{^allParams}}:{{/allParams}}{{#allParams}}{{#secondaryParam}} {{paramName}}{{/secondaryParam}}:({{{dataType}}}) {{paramName}} {{#hasMore}}
|
||||
- (NSURLSessionTask *){{nickname}}WithCompletionBlock {{^allParams}}:{{/allParams}}{{#allParams}}{{#secondaryParam}} {{paramName}}{{/secondaryParam}}:({{{dataType}}}){{paramName}} {{#hasMore}}
|
||||
{{/hasMore}}{{/allParams}}
|
||||
{{#returnBaseType}}{{#hasParams}}
|
||||
completionHandler: {{/hasParams}}(void (^)({{{returnType}}} output, NSError* error))completionBlock;{{/returnBaseType}}
|
||||
completionHandler:{{/hasParams}}(void (^)({{{returnType}}} output, NSError *error))completionBlock;{{/returnBaseType}}
|
||||
{{^returnBaseType}}{{#hasParams}}
|
||||
completionHandler: {{/hasParams}}(void (^)(NSError* error))completionBlock;{{/returnBaseType}}
|
||||
completionHandler: {{/hasParams}}(void (^)(NSError * error))completionBlock;{{/returnBaseType}}
|
||||
|
||||
{{newline}}
|
||||
{{/operation}}
|
||||
|
||||
Reference in New Issue
Block a user