swagger-api / swagger-api/swagger-codegen
Don't change param names when generating Feign interfaces
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
At the moment param names are changed from snake_case to camelCase when generating Feign interfaces.
So when generating client code for this spec:
parameters: [
{
name: "grant_type",
in: "formData",
description: "client_credentials",
required: true,
type: "string",
default: "client_credentials"
}
]
your body ends up like this:
{
grandtType: "XXXX"
}
when it actually should look like this:
{
grant_type: "XXXX"
}
Swagger-codegen version
2.2.2
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 Feign interface generator and the parameter-name conversion used for formData parameters. Reproduce the provided specification and verify that the generated request body preserves grant_type instead of changing it to camelCase; add or update the relevant generator coverage if one is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100