Skip to content

Commit ddc810c

Browse files
Merge branch 'master' of github.com:CiscoM31/openapi-generator into python-null-type
2 parents dc7a7e0 + 30ee3f3 commit ddc810c

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff 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}}

modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ All URIs are relative to *{{{basePath}}}*
88

99
Class | 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

0 commit comments

Comments
 (0)