forked from loafle/openapi-generator-original
* Fix #6157: Updated native template to fix null async return Should fix issue: https://github.com/OpenAPITools/openapi-generator/issues/6157 * fixed uncaught json exception in java native api gen * cleaning up Co-authored-by: Luis Ballabeni <luis.ballabeni@lexisnexis.com>
This commit is contained in:
parent
90ff4926b9
commit
30ee3f343e
@ -180,14 +180,18 @@ public class {{classname}} {
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(
|
||||
{{#returnValue}}
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {})
|
||||
{{/returnValue}}
|
||||
{{^returnValue}}
|
||||
null
|
||||
{{/returnValue}}
|
||||
);
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
{{#returnType}}
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {})
|
||||
{{/returnType}}
|
||||
{{^returnType}}
|
||||
null
|
||||
{{/returnType}}
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
{{/asyncNative}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user