diff --git a/code-gen/conf/templates/java/EnumObject.st b/code-gen/conf/templates/java/EnumObject.st index 94811ac04d0..9cbc2c661c5 100644 --- a/code-gen/conf/templates/java/EnumObject.st +++ b/code-gen/conf/templates/java/EnumObject.st @@ -6,7 +6,7 @@ import $import$; /** * $enum.description$ - * NOTE: This class is auto generated by the drive code generator program so please do not edit the program manually. + * NOTE: This class is auto generated by the drive code generator program so please do not edit the class manually. * @author deepak * */ diff --git a/code-gen/conf/templates/java/ModelObject.st b/code-gen/conf/templates/java/ModelObject.st index afbba6d4ec6..61b435fb311 100644 --- a/code-gen/conf/templates/java/ModelObject.st +++ b/code-gen/conf/templates/java/ModelObject.st @@ -9,7 +9,7 @@ import $import$; /** * $model.description$ - * NOTE: This class is auto generated by the drive code generator program so please do not edit the program manually. + * NOTE: This class is auto generated by the drive code generator program so please do not edit the class manually. * @author ramesh * */ diff --git a/code-gen/conf/templates/java/ResourceObject.st b/code-gen/conf/templates/java/ResourceObject.st index 685362b16bf..3887c24b919 100644 --- a/code-gen/conf/templates/java/ResourceObject.st +++ b/code-gen/conf/templates/java/ResourceObject.st @@ -18,7 +18,7 @@ import $import$; }$ /** - * NOTE: This class is auto generated by the drive code generator program so please do not edit the program manually. + * NOTE: This class is auto generated by the drive code generator program so please do not edit the class manually. * @author ramesh * */ @@ -29,12 +29,13 @@ $methods:{ method | * $method.description$ $method.arguments:{ argument | * @param $argument.name$ $argument.description$ -$if(argument.allowedValues)$ - * Allowed values are - $argument.allowedValues$ -$endif$ + $if(argument.allowedValues)$ + * Allowed values are - $argument.allowedValues$ + $endif$ }$ - * - * @return $method.returnValue$ {@link $method.returnClassName$} + * +$if(!method.responseVoid)$ + * @return $method.returnValue$ {@link $method.returnClassName$} $endif$ * @throws APIException $method.exceptionDescription$ */ $if(method.hasArguments)$ diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/EndpointOperation.java b/code-gen/src/main/java/com/wordnik/codegen/resource/EndpointOperation.java index 97f98358292..fa361d1e0bd 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/EndpointOperation.java +++ b/code-gen/src/main/java/com/wordnik/codegen/resource/EndpointOperation.java @@ -299,7 +299,6 @@ public class EndpointOperation { method.setMethodType(this.getHttpMethod()); //get return value - //private String returnValue; List response = this.getResponse(); method.setReturnValue(config.getDataTypeMapper().getReturnValueType(response.get(0).getValueType())); diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/ModelField.java b/code-gen/src/main/java/com/wordnik/codegen/resource/ModelField.java index 532f74614e7..af9f01bf587 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/ModelField.java +++ b/code-gen/src/main/java/com/wordnik/codegen/resource/ModelField.java @@ -99,8 +99,10 @@ public class ModelField { for(String allowedValue: this.allowableValues){ result += (allowedValue +","); } - - return result.substring(0, result.length()); + if(result.length() == 0) + return null; + else + return result.substring(0, result.length() - 1); } public void setAllowedValues(String csvAlowedValue) { diff --git a/java/src/main/java/com/wordnik/exception/APIException.java b/java/src/main/java/com/wordnik/exception/APIException.java index 52c36ecc599..42c27118e55 100644 --- a/java/src/main/java/com/wordnik/exception/APIException.java +++ b/java/src/main/java/com/wordnik/exception/APIException.java @@ -9,7 +9,7 @@ import org.codehaus.jackson.annotate.JsonProperty; /** * Exception that is thrown if there are any issues in invoking Wordnik API. * - * Each exception carries a code and message. Code can be either HTTP error response code {@link ClientResponse.Status} + * Each exception carries a code and message. Code can be either HTTP error response code {@link com.sun.jersey.api.client.ClientResponse.Status} * or The list of possible Wordnik exception code that are listed in the interface {@link APIExceptionCodes}. * User: ramesh * Date: 3/31/11