Skip to content

Commit aeb2232

Browse files
committed
review
1 parent 1e08af1 commit aeb2232

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ public Map<String, Object> postProcessOperationsWithModels(
9494
continue;
9595
}
9696

97-
boolean hasBodyParams = ope.bodyParams.size() > 0;
98-
boolean hasHeaderParams = ope.headerParams.size() > 0;
99-
boolean hasQueryParams = ope.queryParams.size() > 0;
100-
boolean hasPathParams = ope.pathParams.size() > 0;
97+
boolean hasBodyParams = !ope.bodyParams.isEmpty();
98+
boolean hasHeaderParams = !ope.headerParams.isEmpty();
99+
boolean hasQueryParams = !ope.queryParams.isEmpty();
100+
boolean hasPathParams = !ope.pathParams.isEmpty();
101101

102102
// If there is nothing but body params, we just check if it's a single param
103103
if (

templates/javascript/api-single.mustache

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ export function create{{capitalizedApiName}}(options: CreateClientOptions{{#hasR
198198
export type {{capitalizedApiName}} = ReturnType<typeof create{{capitalizedApiName}}>;
199199

200200
{{#operation}}
201-
{{#vendorExtensions}}
202-
{{#x-create-wrapping-object}}
201+
{{#vendorExtensions.x-create-wrapping-object}}
203202
export type {{#lambda.titlecase}}{{nickname}}{{/lambda.titlecase}}Props = {
204203
{{#allParams}}
205204
{{#description}}
@@ -210,8 +209,7 @@ export type {{#lambda.titlecase}}{{nickname}}{{/lambda.titlecase}}Props = {
210209
{{paramName}}{{^required}}?{{/required}}: {{{dataType}}};
211210
{{/allParams}}
212211
}
213-
{{/x-create-wrapping-object}}
214-
{{/vendorExtensions}}
212+
{{/vendorExtensions.x-create-wrapping-object}}
215213

216214
{{/operation}}
217215

0 commit comments

Comments
 (0)