mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-02 21:50:55 +00:00
Swagr code-gen: Changes to support 'ok' as return type and removing an unused reference
This commit is contained in:
parent
f73ef03c50
commit
e2e830235e
@ -134,6 +134,8 @@ public class JavaDataTypeMapper implements DataTypeMapper {
|
|||||||
}else if (type.startsWith("Map[")) {
|
}else if (type.startsWith("Map[")) {
|
||||||
classShortName = type.substring(4, type.length()-1);
|
classShortName = type.substring(4, type.length()-1);
|
||||||
classShortName = getObjectType(classShortName, true);
|
classShortName = getObjectType(classShortName, true);
|
||||||
|
}else if (type.equals("ok")) {
|
||||||
|
classShortName = "void";
|
||||||
}else{
|
}else{
|
||||||
classShortName = getObjectType(type, true);
|
classShortName = getObjectType(type, true);
|
||||||
}
|
}
|
||||||
@ -148,7 +150,7 @@ public class JavaDataTypeMapper implements DataTypeMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getReturnValueType(String type) {
|
public String getReturnValueType(String type) {
|
||||||
if(type.equalsIgnoreCase("void")){
|
if(type.equalsIgnoreCase("void")|| type.equalsIgnoreCase("ok")){
|
||||||
return "void";
|
return "void";
|
||||||
}
|
}
|
||||||
String classShortName = "";
|
String classShortName = "";
|
||||||
|
@ -6,7 +6,6 @@ import com.wordnik.exception.WordnikAPIException;
|
|||||||
import com.wordnik.exception.WordnikExceptionCodes;
|
import com.wordnik.exception.WordnikExceptionCodes;
|
||||||
import com.wordnik.model.AudioFile;
|
import com.wordnik.model.AudioFile;
|
||||||
import com.wordnik.model.FrequencySummary;
|
import com.wordnik.model.FrequencySummary;
|
||||||
import com.wordnik.model.GetFrequencyOutput;
|
|
||||||
import org.codehaus.jackson.map.type.TypeFactory;
|
import org.codehaus.jackson.map.type.TypeFactory;
|
||||||
import org.codehaus.jackson.type.TypeReference;
|
import org.codehaus.jackson.type.TypeReference;
|
||||||
|
|
||||||
@ -89,7 +88,7 @@ public abstract class AbstractWordAPI extends WordnikAPI {
|
|||||||
*
|
*
|
||||||
* @param endYear Ending Year
|
* @param endYear Ending Year
|
||||||
*
|
*
|
||||||
* @return GetFrequencyOutput {@link com.wordnik.model.GetFrequencyOutput}
|
* @return FrequencySummary {@link com.wordnik.model.FrequencySummary}
|
||||||
* @throws WordnikAPIException 400 - Invalid word supplied. 404 - No results. 400 - Invalid word supplied. 404 - No results.
|
* @throws WordnikAPIException 400 - Invalid word supplied. 404 - No results. 400 - Invalid word supplied. 404 - No results.
|
||||||
*/
|
*/
|
||||||
@MethodArgumentNames(value="word, useCanonical, startYear, endYear")
|
@MethodArgumentNames(value="word, useCanonical, startYear, endYear")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user