swagger-api / swagger-api/swagger-codegen
nodejs-server not respecting javascript reserved words.
Open
Nobody has claimed this yet.
help wanted
Issue: Bug
Server: Nodejs
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
One of the generated controller functions has the javascript reserved name "delete", which makes npm start fail.
module.exports.delete = function delete (req, res, next) {
ManageNetworks.delete(req.swagger.params, res, next);
};
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
Start with the generated controller snippet and the npm start failure, then locate the Node.js server template that produces it. Done means generated controllers no longer use the reserved name "delete" and npm start succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100