swagger-api / swagger-api/swagger-codegen-generators
jaxrs-resteasy processor generates invalid source code for enums
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Example of invalid code:
public enum CustomerStatus {
{values=[N, P, A], enumVars=[{name=N, value="N"}, {name=P, value="P"}, {name=A, value="A"}]}
}
Apparently JavaJaxRS/resteasy/enumOuterClass.mustache template was not updated to accommodate to changes in enum representation introduced in 105872877
I've verfied that copying the contents of JavaJaxRS/resteasy/eap/enumOuterClass.mustache to JavaJaxRS/resteasy/enumOuterClass.mustache fixes the problem. I'll post a PR shortly.
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 JavaJaxRS/resteasy/enumOuterClass.mustache and compare it with JavaJaxRS/resteasy/eap/enumOuterClass.mustache, as the issue identifies both templates and the enum representation change. Reproduce the generated CustomerStatus example, then verify that the RESTEasy processor emits valid enum source matching the updated representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100