forked from loafle/openapi-generator-original
2208 fix Objc Mapping Generation (#3894)
* Change test to test valid compileable code. This is not a Objective-C Generic, but a protocol. This is what the JSONModel mapping library expects * Update implementation to properly render NSDictionaries that will work with JSONModel
This commit is contained in:
parent
d48ce8b503
commit
504f8f1f21
@ -359,7 +359,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
return getSwaggerType(p) + "<NSString*, " + innerTypeDeclaration + "*>*";
|
return getSwaggerType(p) + "<NSString*, " + innerTypeDeclaration + "*>*";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return getSwaggerType(p) + "<NSString*, " + innerTypeDeclaration + ">*";
|
return getSwaggerType(p) + "<" + innerTypeDeclaration + ">*";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String swaggerType = getSwaggerType(p);
|
String swaggerType = getSwaggerType(p);
|
||||||
|
@ -224,7 +224,7 @@ public class ObjcModelTest {
|
|||||||
final CodegenProperty property1 = cm.vars.get(0);
|
final CodegenProperty property1 = cm.vars.get(0);
|
||||||
Assert.assertEquals(property1.baseName, "children");
|
Assert.assertEquals(property1.baseName, "children");
|
||||||
Assert.assertEquals(property1.complexType, "SWGChildren");
|
Assert.assertEquals(property1.complexType, "SWGChildren");
|
||||||
Assert.assertEquals(property1.datatype, "NSDictionary<NSString*, SWGChildren>*");
|
Assert.assertEquals(property1.datatype, "NSDictionary<SWGChildren>*");
|
||||||
Assert.assertEquals(property1.name, "children");
|
Assert.assertEquals(property1.name, "children");
|
||||||
Assert.assertEquals(property1.baseType, "NSDictionary");
|
Assert.assertEquals(property1.baseType, "NSDictionary");
|
||||||
Assert.assertEquals(property1.containerType, "map");
|
Assert.assertEquals(property1.containerType, "map");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user