swagger-api / swagger-api/swagger-codegen
[scala] stripPackageName should be configurable
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
See https://github.com/swagger-api/swagger-codegen/pull/7226 Pull Request
Needed because some APIs (e.g. Kubernetes) include version information in packages. Stripping causes many generated API and model classes to be named the same, causing a last-one-wins situation which is unacceptable.
- Version of swagger-codegen used: latest from master branch
- Language: scala
Steps to reproduce
- Example input spec to produce the problem: https://raw.githubusercontent.com/kubernetes-client/java/master/kubernetes/swagger.json
- In generated output, notice multiple versions from input spec have been lost due to package stripping.
Suggest a fix/enhancement
Make stripping package prefix optional.
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 with pull request 7226 and the Scala generator entry point that handles stripPackageName. Reproduce the issue with the linked Kubernetes swagger.json and inspect generated output across versioned packages. Done means package stripping can be disabled so version-specific API and model classes are not overwritten.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100