From 9a77c485406f8a44029303065b0770951ef26a24 Mon Sep 17 00:00:00 2001 From: Yet Another Minion Date: Mon, 22 Aug 2016 07:52:10 -0400 Subject: [PATCH] For Qt5 server generator, add BaseIntegerProperty to default values (#3622) * For Qt5 server generator, add BaseIntegerProperty to default values * move base property check to after checks of extended properties --- .../java/io/swagger/codegen/languages/Qt5CPPGenerator.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Qt5CPPGenerator.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Qt5CPPGenerator.java index 742b057003..d922b6aec5 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Qt5CPPGenerator.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Qt5CPPGenerator.java @@ -11,6 +11,7 @@ import io.swagger.models.properties.DateTimeProperty; import io.swagger.models.properties.DecimalProperty; import io.swagger.models.properties.DoubleProperty; import io.swagger.models.properties.FloatProperty; +import io.swagger.models.properties.BaseIntegerProperty; import io.swagger.models.properties.IntegerProperty; import io.swagger.models.properties.LongProperty; import io.swagger.models.properties.MapProperty; @@ -270,6 +271,10 @@ public class Qt5CPPGenerator extends DefaultCodegen implements CodegenConfig { return "0"; } else if (p instanceof LongProperty) { return "0L"; + } else if (p instanceof BaseIntegerProperty) { + // catchall for any other format of the swagger specifiction + // integer type not explictly handled above + return "0"; } else if (p instanceof DecimalProperty) { return "0.0"; } else if (p instanceof MapProperty) {