OpenAPITools / OpenAPITools/openapi-generator
[BUG] Scala templates use different case styles and formatters for variables
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Bounty to sponsor the fix (example)
Description
UPPERCASE value was handled by most of scala templates with do not modify option, but behaviour was different for akka template where output was uPPERCASE
This behaviour become generic and UPPERCASE variables skipped for formatting rules
But regarding to https://docs.scala-lang.org/style/naming-conventions.html only camelCase allowed.
Correct way is to convert UPPERCASE into lowercase and keep naming convention in AbstractScala common to all Scala based templates
openapi-generator version
4.3.0-SNAPSHOT
Related issues/PRs
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 in modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java around line 172, then compare the naming behavior of the Scala templates, especially akka. Confirm the handling described in the issue and the related PR discussion. Done means UPPERCASE variables become lowercase and other variables are camelized consistently across Scala templates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100