swagger-api / swagger-api/swagger-codegen-generators
Incorrect order of parameters with nodejs-server
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
When generating the nodejs-server code, the order of parameters for GET methods does not match the expected order.
Both this library (for POST methods) and the "oas3-tools" library expect the order of the parameters to be:
query --> path --> headers --> cookies
The NodeJSServerCodegen is currently adding "allParams" for GET requests, which will output parameters in the order defined in the swagger file (which could be path --> query --> headers --> cookies).
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 by locating the NodeJSServerCodegen entry point and the GET handling that adds "allParams"; compare it with the POST parameter ordering described in the issue. Done means generated GET methods consistently order parameters as query, path, headers, then cookies, rather than following the Swagger file order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100