swagger-api / swagger-api/swagger-codegen
[javascript] custom configuration does not generate index.js
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
We have a custom client configuration to generate client side stud
Swagger-codegen version
2.3.1
Swagger declaration file content or url
Client Config file looks like below
"groupId":"com.acme.pet",
"artifactId":"pet-client-core",
"artifactVersion":"1.0.0",
"artifactUrl":"https://bitbucket.org/acme/pet-client-Core",
"artifactDescription":"Acme Pet Center client core driver",
"licenseName":"Acme Proprietary",
"licenseUrl":"https://acme.co",
"scmConnection":"Acme Proprietary" ,
"scmDeveloperConnection":"Acme Proprietary",
"scmURL":"https://bitbucket.org/acme/pet-client-core",
"developerName":"Acme" ,
"developerEmail":"hello@acme.co" ,
"developerOrganization":"Acme" ,
"developerOrganizationUrl":"https://acme.co" ,
"modelPackage":"com.acme.pet.models",
"apiPackage":"com.acme.pet.apis",
"invokerPackage":"com.acme.pet.client",
"httpUserAgent": "Acme-DRC-Driver"
}
Command line used for generation
java -jar /usr/share/swagger/swagger-codegen.jar generate -l javascript -c pet-client-config.json -i pet.yaml
Steps to reproduce
create a config.json as mentioned above and run the above command.
Notice that javascript code generated does not have "index.js" as expected.
Related issues/PRs
Suggest a fix/enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with pet-client-config.json, pet.yaml, and the documented java -jar ... generate -l javascript command. Inspect the JavaScript generation path and its templates to determine why index.js is omitted; done means the generated JavaScript client includes index.js with the custom configuration.
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
- 35/100