swagger-api / swagger-api/swagger-codegen
[nodejs-server] Bug- dot parameters not converted to suitable variable name in javascript
Open
@HugoMario is already working on this.
Since Oct 3, 2019.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
if the api call has a parameter like this:
{
"name": "q.where",
"in": "query",
"description": "WHERE clause",
"required": true,
"type": "string"
}
it produces code that looks like
var q.where = req.swagger.params['q.where'].value;
and dots in variable names are not supported in javascript.
Swagger-codegen version
3.0.11
Swagger declaration file content or url
Command line used for generation
brew install swagger-codegen
swagger-codegen generate -i https://etc/etc/etc/api-spec.json -l nodejs-server -o ./test
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.
Assessment
This issue has not been assessed yet.