forked from loafle/openapi-generator-original
This commit is contained in:
committed by
GitHub
parent
0f2a27d3c5
commit
55c580579e
@@ -861,9 +861,11 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
|
||||
public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels) {
|
||||
super.postProcessOperationsWithModels(objs, allModels);
|
||||
OperationMap operations = objs.getOperations();
|
||||
boolean isResponseFile = false;
|
||||
if (operations != null) {
|
||||
List<CodegenOperation> ops = operations.getOperation();
|
||||
for (CodegenOperation operation : ops) {
|
||||
isResponseFile = isResponseFile || operation.isResponseFile;
|
||||
|
||||
if (JVM_RETROFIT2.equals(getLibrary()) && StringUtils.isNotEmpty(operation.path) && operation.path.startsWith("/")) {
|
||||
operation.path = operation.path.substring(1);
|
||||
@@ -940,6 +942,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
|
||||
}
|
||||
}
|
||||
}
|
||||
objs.put("isResponseFile", isResponseFile);
|
||||
return objs;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,12 +65,6 @@ import okhttp3.MultipartBody
|
||||
|
||||
{{/isMultipart}}
|
||||
{{/x-kotlin-multipart-import}}
|
||||
{{#operation}}
|
||||
{{#isResponseFile}}
|
||||
import okhttp3.ResponseBody
|
||||
|
||||
{{/isResponseFile}}
|
||||
{{/operation}}
|
||||
interface {{classname}} {
|
||||
{{#operation}}
|
||||
{{#allParams}}
|
||||
|
||||
Reference in New Issue
Block a user