From 7a2c0a076a6d05bea7b53b9c80a8d0e205dc8479 Mon Sep 17 00:00:00 2001 From: wing328 Date: Sun, 16 Aug 2015 00:03:19 +0800 Subject: [PATCH] update readme, change default value, update pom --- README.md | 1 + .../swagger/codegen/languages/FlashClientCodegen.java | 10 +++++----- pom.xml | 2 +- .../src/main/flex/io/swagger/client/model/Category.as | 2 +- .../src/main/flex/io/swagger/client/model/Order.as | 8 ++++---- .../flash/src/main/flex/io/swagger/client/model/Pet.as | 2 +- .../flash/src/main/flex/io/swagger/client/model/Tag.as | 2 +- .../src/main/flex/io/swagger/client/model/User.as | 4 ++-- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f52c4097347..703adaa7089 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,7 @@ AkkaScalaClientCodegen.java AndroidClientCodegen.java AsyncScalaClientCodegen.java CSharpClientCodegen.java +FlashClientCodegen.java JavaClientCodegen.java JaxRSServerCodegen.java NodeJSServerCodegen.java diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FlashClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FlashClientCodegen.java index 1708a7deda5..ca0979fb694 100755 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FlashClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FlashClientCodegen.java @@ -211,7 +211,7 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig if (p instanceof StringProperty) { return "null"; } else if (p instanceof BooleanProperty) { - return "null"; + return "false"; } else if (p instanceof DateProperty) { return "null"; } else if (p instanceof DateTimeProperty) { @@ -221,25 +221,25 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig if (dp.getDefault() != null) { return dp.getDefault().toString(); } - return "null"; + return "0.0"; } else if (p instanceof FloatProperty) { FloatProperty dp = (FloatProperty) p; if (dp.getDefault() != null) { return dp.getDefault().toString(); } - return "null"; + return "0.0"; } else if (p instanceof IntegerProperty) { IntegerProperty dp = (IntegerProperty) p; if (dp.getDefault() != null) { return dp.getDefault().toString(); } - return "null"; + return "0"; } else if (p instanceof LongProperty) { LongProperty dp = (LongProperty) p; if (dp.getDefault() != null) { return dp.getDefault().toString(); } - return "null"; + return "0"; } else if (p instanceof MapProperty) { MapProperty ap = (MapProperty) p; String inner = getSwaggerType(ap.getAdditionalProperties()); diff --git a/pom.xml b/pom.xml index a7e35de01c3..24d7de3b5a2 100644 --- a/pom.xml +++ b/pom.xml @@ -459,7 +459,7 @@ 1.0.10-SNAPSHOT 2.11.1 2.3.4 - 1.5.3-SNAPSHOT + 1.5.4-SNAPSHOT 2.1.4 2.3 1.2 diff --git a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Category.as b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Category.as index e9cd242fce5..6aa73414387 100644 --- a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Category.as +++ b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Category.as @@ -8,7 +8,7 @@ package io.swagger.client.model { [XmlElement(name="id")] - public var id: Number = null; + public var id: Number = 0; diff --git a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Order.as b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Order.as index e0bf20f35c2..d6e4e6dc4d7 100644 --- a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Order.as +++ b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Order.as @@ -8,19 +8,19 @@ package io.swagger.client.model { [XmlElement(name="id")] - public var id: Number = null; + public var id: Number = 0; [XmlElement(name="petId")] - public var petId: Number = null; + public var petId: Number = 0; [XmlElement(name="quantity")] - public var quantity: Number = null; + public var quantity: Number = 0; @@ -39,7 +39,7 @@ package io.swagger.client.model { [XmlElement(name="complete")] - public var complete: Boolean = null; + public var complete: Boolean = false; public function toString(): String { diff --git a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Pet.as b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Pet.as index 9f7300ff13e..81b29d91e4c 100644 --- a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Pet.as +++ b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Pet.as @@ -10,7 +10,7 @@ import io.swagger.client.model.Tag; [XmlElement(name="id")] - public var id: Number = null; + public var id: Number = 0; diff --git a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Tag.as b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Tag.as index 35d2d484bd8..7387e2e2745 100644 --- a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Tag.as +++ b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/Tag.as @@ -8,7 +8,7 @@ package io.swagger.client.model { [XmlElement(name="id")] - public var id: Number = null; + public var id: Number = 0; diff --git a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/User.as b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/User.as index f8014cad5d3..2b6474de90c 100644 --- a/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/User.as +++ b/samples/client/petstore/flash/src/main/flex/io/swagger/client/model/User.as @@ -8,7 +8,7 @@ package io.swagger.client.model { [XmlElement(name="id")] - public var id: Number = null; + public var id: Number = 0; @@ -51,7 +51,7 @@ package io.swagger.client.model { [XmlElement(name="userStatus")] - public var userStatus: Number = null; + public var userStatus: Number = 0; public function toString(): String {