swagger-api / swagger-api/swagger-codegen

[JavaScript] invokerPackage Config Parameter Not Functioning Properly

Open
#8,264 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Using invokerPackage in a config file should result in setting the root path for the SDK. However, ApiClient.js and index.js are not moved into the root directory and remain in /src. As a result the entry point to the SDK ("main" in package.json) is set to /src/invokerPackage/index.js but index.js remains at /src.

Swagger-codegen version

Snapshot of 2.4.0

Steps to reproduce
  1. Create a JavaScript config file which has the invokerPackage parameter set
  2. Generate a JavaScript SDK with above config file

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the JavaScript generator's handling of the invokerPackage config alongside the generated ApiClient.js, index.js, and package.json. Reproduce SDK generation with invokerPackage set, then verify that the files are placed under the configured root and that package.json points to the resulting index.js.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.