swagger-api / swagger-api/swagger-codegen
keyParamName has no sanitized form
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Hi
I'm adapting our spring(boot) mustache files to comply to our security needs. However we've noticed that the CodegenSecurity class is not as well defined as CodegenParameter.
For our use case we have an api-key defined as header in our specification. If we try to get this in our code, we can only get the keyParamName. We need a sanitized form to use this as java variable name.
If we define a header as param, we can get the sanitized name.
It would be nice if we had the same baseName and paramName options for this keyParamName.
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 reading CodegenSecurity and comparing its keyParamName handling with CodegenParameter's baseName and paramName options. Inspect the Spring Boot Mustache templates that consume CodegenSecurity; the work is done when sanitized equivalents are available for keyParamName and usable as Java variable names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi, spring-boot
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100