mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-18 04:29:08 +00:00
[JavaScript] Add petstore integration test to JS ES6 client (OAS3) (#2245)
* add test for js es6 oas3 client * fix test with proper done * add test, fix servers index check
This commit is contained in:
@@ -978,13 +978,21 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
hasOptionalParams = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (operation.servers != null && !operation.servers.isEmpty()) {
|
||||
// add optional parameter for servers (e.g. index)
|
||||
hasOptionalParams = true;
|
||||
}
|
||||
|
||||
if (hasOptionalParams) {
|
||||
argList.add("opts");
|
||||
}
|
||||
}
|
||||
|
||||
if (!usePromises) {
|
||||
argList.add("callback");
|
||||
}
|
||||
operation.vendorExtensions.put("x-codegen-argList", StringUtils.join(argList, ", "));
|
||||
operation.vendorExtensions.put("x-codegen-hasOptionalParams", hasOptionalParams);
|
||||
|
||||
// Store JSDoc type specification into vendor-extension: x-jsdoc-type.
|
||||
for (CodegenParameter cp : operation.allParams) {
|
||||
|
||||
Reference in New Issue
Block a user