File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
modules/openapi-generator/src/main/resources Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -180,14 +180,18 @@ public class {{classname}} {
180180 localVarResponse.body())
181181 );
182182 } else {
183- return CompletableFuture.completedFuture(
184- {{#returnValue} }
185- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{ {{returnType} }}>() { } )
186- { {/returnValue} }
187- { {^returnValue} }
188- null
189- { {/returnValue} }
190- );
183+ try {
184+ return CompletableFuture.completedFuture(
185+ {{#returnType} }
186+ memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{ {{returnType} }}>() { } )
187+ { {/returnType} }
188+ { {^returnType} }
189+ null
190+ { {/returnType} }
191+ );
192+ } catch (IOException e) {
193+ return CompletableFuture.failedFuture(new ApiException(e));
194+ }
191195 }
192196 });
193197 { {/asyncNative} }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ All URIs are relative to *{{{basePath}}}*
88
99Class | Method | HTTP request | Description
1010------------ | ------------- | ------------- | -------------
11- { {#apiInfo} }{ {#apis} }{ {#operations} }{ {#operation} }*{ {classname} }* | [**{ {operationId} }**](Apis/{ {apiDocPath} }{ {classname} }.md#{ {operationIdLowerCase} }) | **{ {httpMethod} }** { {path} } | { {#summary} }{ {{summary} }}{ {/summary} }
11+ { {#apiInfo} }{ {#apis} }{ {#operations} }{ {#operation} }*{ {classname} }* | [**{ {operationId} }**](Apis/{ {apiDocPath} }{ {classname} }.md#{ {operationIdLowerCase} }) | **{ {httpMethod} }** { {path} } | { {#summary} }{ {{summary} }}{ {/summary} }{ {^summary } } { {{notes } }} { {/summary } }
1212{ {/operation} }{ {/operations} }{ {/apis} }{ {/apiInfo} }
1313{ {/generateApiDocs} }
1414
You can’t perform that action at this time.
0 commit comments