Skip to content

Commit e4183a5

Browse files
committed
fixed cast exception in templates.
1 parent 63b8828 commit e4183a5

File tree

1 file changed

+6
-6
lines changed
  • src/main/resources/handlebars/Java/libraries/resttemplate

1 file changed

+6
-6
lines changed

src/main/resources/handlebars/Java/libraries/resttemplate/api.mustache

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class {{classname}} {
6767
* @see <a href="{{url}}">{{summary}} Documentation</a>
6868
{{/externalDocs}}
6969
*/
70-
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#parameters}}{{{dataType}}} {{paramName}}{{#has this 'more'}}, {{/has}}{{/parameters}}) throws RestClientException {
70+
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#parameters}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) throws RestClientException {
7171
Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
7272
{{#parameters}}
7373
{{#required}}
@@ -107,16 +107,16 @@ public class {{classname}} {
107107
{{/formParams}}
108108
{{/hasFormParams}}
109109

110-
final String[] {{localVariablePrefix}}accepts = { {{#has this 'produces'}}
110+
final String[] {{localVariablePrefix}}accepts = { {{#hasProduces}}
111111
{{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
112-
{{/has}} };
112+
{{/hasProduces}} };
113113
final List<MediaType> {{localVariablePrefix}}accept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}accepts);
114-
final String[] {{localVariablePrefix}}contentTypes = { {{#has this 'consumes'}}
114+
final String[] {{localVariablePrefix}}contentTypes = { {{#hasConsumes}}
115115
{{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
116-
{{/has}} };
116+
{{/hasConsumes}} };
117117
final MediaType {{localVariablePrefix}}contentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}contentTypes);
118118

119-
String[] {{localVariablePrefix}}authNames = new String[] { {{#authMethods}}"{{name}}"{{#has this 'more'}}, {{/has}}{{/authMethods}} };
119+
String[] {{localVariablePrefix}}authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
120120

121121
{{#returnType}}ParameterizedTypeReference<{{{returnType}}}> {{localVariablePrefix}}returnType = new ParameterizedTypeReference<{{{returnType}}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference<Void> {{localVariablePrefix}}returnType = new ParameterizedTypeReference<Void>() {};{{/returnType}}
122122
{{#returnType}}return {{/returnType}}{{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}path, HttpMethod.{{httpMethod}}, {{localVariablePrefix}}queryParams, {{localVariablePrefix}}postBody, {{localVariablePrefix}}headerParams, {{localVariablePrefix}}formParams, {{localVariablePrefix}}accept, {{localVariablePrefix}}contentType, {{localVariablePrefix}}authNames, {{localVariablePrefix}}returnType);

0 commit comments

Comments
 (0)