swagger-api / swagger-api/swagger-codegen
[JavaScript][ES6] The Petstore integration tests failed
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The Petstore integration tests for JS ES6 failed
/private/tmp/swagger-codegen/samples/client/petstore/javascript-promise-es6/node_modules/babel-core/lib/transformation/file/index.js:600
throw err;
^
SyntaxError: /private/tmp/swagger-codegen/samples/client/petstore/javascript-promise-es6/src/model/AnimalFarm.js: Invalid left-hand side in assignment expression (37:8)
35 | constructor() {
36 |
> 37 | this = new Array();
| ^
38 | Object.setPrototypeOf(this, AnimalFarm);
39 |
40 |
at Parser.pp$5.raise (/private/tmp/swagger-codegen/samples/client/petstore/javascript-promise-es6/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp$2.toAssignable (/private/tmp/swagger-codegen/samples/client/petstore/javascript-promise-es6/node_modules/babylon/lib/index.js:3008:16)
Swagger-codegen version
Latest master.
Steps to reproduce
To repeat the issue for javascript-promise-es6
cd samples/client/petstore/javascript-promise-es6
npm install
npm test
To repeat the issue for javascript-es6
cd samples/client/petstore/javascript-es6
npm install
npm test
Suggest a Fix
If anyone wants to work on the issue, please reply to let us know.
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
Run npm install and npm test in samples/client/petstore/javascript-promise-es6 and samples/client/petstore/javascript-es6. Start with the generated src/model/AnimalFarm.js error at the constructor assignment, then trace the template input that produces it. Done means both JavaScript ES6 Petstore integration test suites complete without the syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100