swagger-api / swagger-api/swagger-codegen
Add a prefix to all generated classes
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
When generating classes from openapi yaml file, we can only can add a prefix to model classes and enums.
Is there a way to do the same with all generated classes ?
I have to generate 2 clients in the same project but both are generated with i.e. ApiClient.java (even if it is in separate packages).
I would be great if we could add a prefix.
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
No source file, test, or entry point is named. Start by locating the OpenAPI YAML generation path and the Java client class-name handling, then compare how prefixes currently apply to model classes and enums. Done means a configurable prefix can apply to all generated classes so two clients can coexist without ApiClient.java name collisions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100