forked from loafle/openapi-generator-original
Merge pull request #2934 from alexandern/master
Mispelling in Objective-C initialization template
This commit is contained in:
commit
6c33552d0d
@ -307,12 +307,12 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
if(innerTypeDeclaration.equalsIgnoreCase(BinaryDataType)) {
|
if(innerTypeDeclaration.equalsIgnoreCase(BinaryDataType)) {
|
||||||
return "NSData*";
|
return "NSData*";
|
||||||
}
|
}
|
||||||
// In this codition, type of property p is array of primitive,
|
// In this condition, type of property p is array of primitive,
|
||||||
// return container type with pointer, e.g. `NSArray*<NSString*>*'
|
// return container type with pointer, e.g. `NSArray*<NSString*>*'
|
||||||
if (languageSpecificPrimitives.contains(innerTypeDeclaration)) {
|
if (languageSpecificPrimitives.contains(innerTypeDeclaration)) {
|
||||||
return getSwaggerType(p) + "<" + innerTypeDeclaration + "*>*";
|
return getSwaggerType(p) + "<" + innerTypeDeclaration + "*>*";
|
||||||
}
|
}
|
||||||
// In this codition, type of property p is array of model,
|
// In this condition, type of property p is array of model,
|
||||||
// return container type combine inner type with pointer, e.g. `NSArray<SWGTag>*'
|
// return container type combine inner type with pointer, e.g. `NSArray<SWGTag>*'
|
||||||
else {
|
else {
|
||||||
for (String sd : advancedMapingTypes) {
|
for (String sd : advancedMapingTypes) {
|
||||||
@ -344,18 +344,18 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
} else {
|
} else {
|
||||||
String swaggerType = getSwaggerType(p);
|
String swaggerType = getSwaggerType(p);
|
||||||
|
|
||||||
// In this codition, type of p is objective-c primitive type, e.g. `NSSNumber',
|
// In this condition, type of p is objective-c primitive type, e.g. `NSSNumber',
|
||||||
// return type of p with pointer, e.g. `NSNumber*'
|
// return type of p with pointer, e.g. `NSNumber*'
|
||||||
if (languageSpecificPrimitives.contains(swaggerType) &&
|
if (languageSpecificPrimitives.contains(swaggerType) &&
|
||||||
foundationClasses.contains(swaggerType)) {
|
foundationClasses.contains(swaggerType)) {
|
||||||
return swaggerType + "*";
|
return swaggerType + "*";
|
||||||
}
|
}
|
||||||
// In this codition, type of p is c primitive type, e.g. `bool',
|
// In this condition, type of p is c primitive type, e.g. `bool',
|
||||||
// return type of p, e.g. `bool'
|
// return type of p, e.g. `bool'
|
||||||
else if (languageSpecificPrimitives.contains(swaggerType)) {
|
else if (languageSpecificPrimitives.contains(swaggerType)) {
|
||||||
return swaggerType;
|
return swaggerType;
|
||||||
}
|
}
|
||||||
// In this codition, type of p is objective-c object type, e.g. `SWGPet',
|
// In this condition, type of p is objective-c object type, e.g. `SWGPet',
|
||||||
// return type of p with pointer, e.g. `SWGPet*'
|
// return type of p with pointer, e.g. `SWGPet*'
|
||||||
else {
|
else {
|
||||||
return swaggerType + "*";
|
return swaggerType + "*";
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
// initalise property's default value, if any
|
// initialize property's default value, if any
|
||||||
{{#vars}}{{#defaultValue}}self.{{name}} = {{{defaultValue}}};
|
{{#vars}}{{#defaultValue}}self.{{name}} = {{{defaultValue}}};
|
||||||
{{/defaultValue}}{{/vars}}
|
{{/defaultValue}}{{/vars}}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user