Javascript modules, autocomplete does not work
Created by: bgadrian
Hello,
I have an issue with the Javascript generated client. I cannot make the autocomplete (intellij or intellisense) to recognize the generated modules (api or models).
I tried all the supported settings with a custom jsconfig https://code.visualstudio.com/docs/languages/jsconfig
Even if I write explicitely the type /** @type {api/DashboardApi} */
it still doesn't recognize it, the type is "any".
openapi-generator version
3.3.0-SNAPSHOT (docker image)
repro steps
- Run
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
-g javascript \
-o /local/out/javascript
- change the owner of the folders to your user (so you can edit them)
- add a new file
src/help.js
and import the index.js or a specific module
const abc = require("./index");
//OR
import xyz from "./index";
- Notice that in the IDE the types of the properties of main module
* @property {module:ApiClient}
are not recognize as valid types.
Note: the same issue exists even if I install the package according to the instructions for local development (with npm link).
Is there any custom setting I can apply to the project so it can recognize the modules? Thanks.