diff --git a/templates/httpclient/task.h b/templates/httpclient/task.h index f6a4686..ac8891a 100644 --- a/templates/httpclient/task.h +++ b/templates/httpclient/task.h @@ -8,7 +8,7 @@ #import ${endpoints.map(m=> -`#import "${m.model}"; +`#import "${m.model}.h" `).join('')} @interface ${modulename} : PMLRESTBaseHD diff --git a/templates/httpclient/task.m b/templates/httpclient/task.m index 7d9e942..800f69e 100644 --- a/templates/httpclient/task.m +++ b/templates/httpclient/task.m @@ -15,12 +15,15 @@ @implementation ${modulename} PMTASK_INIT_SINGLETON + (NSDictionary *)modelClassesByResourcePath { - return @{${endpoints.map(e=>` - kEndpoint${e.method}: [${e.model} class],`).join('').slice(0,-1)} + return @{ + ${endpoints.map(e=> + `kEndpoint${e.method}: [${e.model} class],` + ).join('').slice(0,-1)} }; } -${endpoints.map(e=>` -PMTASK_EXPORT_IMP(${e.method}, ${e.model})`).join('')} +${endpoints.map(e=> +`PMTASK_EXPORT_IMP(${e.method}, ${e.model})` +).join('')} @end` diff --git a/templates/model/template.h b/templates/model/template.h index baae2d3..ad48ebe 100644 --- a/templates/model/template.h +++ b/templates/model/template.h @@ -8,7 +8,7 @@ #import ${model.props.filter(m=>m.model).map(prop => -`#import ${prop.model}.h +`#import "${prop.model}.h" `).join('')} @interface ${model.className} : ${model.baseName} diff --git a/templates/model/template.m b/templates/model/template.m index cc9ca07..aa7fac0 100644 --- a/templates/model/template.m +++ b/templates/model/template.m @@ -6,7 +6,7 @@ // Copyright © ${(new Date()).getFullYear()} ${copyright} All rights reserved. // -#import ${model.className}.h +#import "${model.className}.h" @implementation ${model.className} diff --git a/templates/model/templatebase.m b/templates/model/templatebase.m index 8a2cdba..8fd3f20 100644 --- a/templates/model/templatebase.m +++ b/templates/model/templatebase.m @@ -6,7 +6,7 @@ // Copyright © ${(new Date()).getFullYear()} ${copyright} All rights reserved. // -#import ${model.className}.h +#import "${model.className}.h" @implementation ${model.className}