fix object declaration in model

This commit is contained in:
wing328 2018-04-09 12:41:36 +08:00
parent 7ca8edb590
commit b5f0b24bae
4 changed files with 1 additions and 7 deletions

View File

@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead. # if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l typescript-angular -o samples/client/petstore/typescript-angular-v2/default --additional-properties ngVersion=2" ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l typescript-angular -o samples/client/petstore/typescript-angular-v2/default --additional-properties ngVersion=2 $@"
java $JAVA_OPTS -jar $executable $ags java $JAVA_OPTS -jar $executable $ags

View File

@ -176,8 +176,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
public String getTypeDeclaration(Schema p) { public String getTypeDeclaration(Schema p) {
if (p instanceof FileSchema) { if (p instanceof FileSchema) {
return "Blob"; return "Blob";
} else if (!StringUtils.isEmpty(p.get$ref())) {
return "any";
} else { } else {
return super.getTypeDeclaration(p); return super.getTypeDeclaration(p);
} }

View File

@ -107,8 +107,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
return "any"; return "any";
} else if (p instanceof BinarySchema) { } else if (p instanceof BinarySchema) {
return "any"; return "any";
} else if (!StringUtils.isEmpty(p.get$ref())) { // model
return "any";
} else { } else {
return super.getTypeDeclaration(p); return super.getTypeDeclaration(p);
} }

View File

@ -156,8 +156,6 @@ public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo
public String getTypeDeclaration(Schema p) { public String getTypeDeclaration(Schema p) {
if (p instanceof FileSchema) { if (p instanceof FileSchema) {
return "Blob"; return "Blob";
} else if (!StringUtils.isEmpty(p.get$ref())) {
return "any";
} else { } else {
return super.getTypeDeclaration(p); return super.getTypeDeclaration(p);
} }