swagger-api / swagger-api/swagger-codegen
[Regression] Import mappings not correctly handled
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I updated my Swagger Codegen project today and remake a build of a project using it to generate code (Java CXF).
I'm now facing an issue, using the "import mappings" feature.
In my pom.xml, I specify:
<configOptions>
<sourceFolder>src/gen/java/main</sourceFolder>
<import-mappings>Event=foo.provided.Event</import-mappings>
</configOptions>
but in the generated code, the Event class used is not the foo.provided.Event. It's the generated one.
This was OK before my update (I can't remember when I made my last update before today).
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 the pom.xml configuration shown in the issue and reproduce generation for the Java CXF project using the import-mappings setting. Compare the generated code's Event reference with foo.provided.Event; the work is done when the mapping is honored instead of using a generated Event class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100