forked from loafle/openapi-generator-original
Fix array problem
This commit is contained in:
parent
d84c1cdfd7
commit
cebaa6443c
@ -139,12 +139,21 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod
|
||||
type = swaggerType;
|
||||
}
|
||||
|
||||
if (!languageSpecificPrimitives.contains(type)) {
|
||||
if (!startsWithLanguageSpecificPrimitiv(type)) {
|
||||
type = "models." + swaggerType;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
private boolean startsWithLanguageSpecificPrimitiv(String type) {
|
||||
for (String langPrimitive:languageSpecificPrimitives) {
|
||||
if (type.startsWith(langPrimitive)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessParameter(CodegenParameter parameter) {
|
||||
super.postProcessParameter(parameter);
|
||||
|
Loading…
x
Reference in New Issue
Block a user