mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 12:10:54 +00:00
Swagr Codegen: Updates to generate comments properly for return type of void and for allowed values, other minor updates
This commit is contained in:
parent
18b06fd8c3
commit
1f738486ee
@ -6,7 +6,7 @@ import $import$;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* $enum.description$
|
* $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
|
* @author deepak
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -9,7 +9,7 @@ import $import$;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* $model.description$
|
* $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
|
* @author ramesh
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -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
|
* @author ramesh
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -34,7 +34,8 @@ $if(argument.allowedValues)$
|
|||||||
$endif$
|
$endif$
|
||||||
}$
|
}$
|
||||||
*
|
*
|
||||||
* @return $method.returnValue$ {@link $method.returnClassName$}
|
$if(!method.responseVoid)$
|
||||||
|
* @return $method.returnValue$ {@link $method.returnClassName$} $endif$
|
||||||
* @throws APIException $method.exceptionDescription$
|
* @throws APIException $method.exceptionDescription$
|
||||||
*/
|
*/
|
||||||
$if(method.hasArguments)$
|
$if(method.hasArguments)$
|
||||||
|
@ -299,7 +299,6 @@ public class EndpointOperation {
|
|||||||
method.setMethodType(this.getHttpMethod());
|
method.setMethodType(this.getHttpMethod());
|
||||||
|
|
||||||
//get return value
|
//get return value
|
||||||
//private String returnValue;
|
|
||||||
List<Response> response = this.getResponse();
|
List<Response> response = this.getResponse();
|
||||||
|
|
||||||
method.setReturnValue(config.getDataTypeMapper().getReturnValueType(response.get(0).getValueType()));
|
method.setReturnValue(config.getDataTypeMapper().getReturnValueType(response.get(0).getValueType()));
|
||||||
|
@ -99,8 +99,10 @@ public class ModelField {
|
|||||||
for(String allowedValue: this.allowableValues){
|
for(String allowedValue: this.allowableValues){
|
||||||
result += (allowedValue +",");
|
result += (allowedValue +",");
|
||||||
}
|
}
|
||||||
|
if(result.length() == 0)
|
||||||
return result.substring(0, result.length());
|
return null;
|
||||||
|
else
|
||||||
|
return result.substring(0, result.length() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAllowedValues(String csvAlowedValue) {
|
public void setAllowedValues(String csvAlowedValue) {
|
||||||
|
@ -9,7 +9,7 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
|||||||
/**
|
/**
|
||||||
* Exception that is thrown if there are any issues in invoking Wordnik API.
|
* 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}.
|
* or The list of possible Wordnik exception code that are listed in the interface {@link APIExceptionCodes}.
|
||||||
* User: ramesh
|
* User: ramesh
|
||||||
* Date: 3/31/11
|
* Date: 3/31/11
|
||||||
|
Loading…
x
Reference in New Issue
Block a user