swagger-api / swagger-api/swagger-codegen
[JAXRS][jersey] pojo.mustache is missing the reference to typeInfoAnotation.mustache
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The pojo.mustache template under JavaJaxRs resource is missing a reference to typeInfoAnotation.mustache, due to this the generated model java classes are missing the JsonSubTypes annotations when discriminators are used in the swagger specification.
Swagger-codegen version
2.3.1, also in the current master branch
Suggest a fix/enhancement
Update pojo.mustache (line#5) to include reference to typeInfoAnnotation
{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
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
Open the pojo.mustache template under the JavaJaxRs resource and inspect line 5 alongside typeInfoAnotation.mustache. Verify the generated Java model for a Swagger discriminator case, and consider the issue's suggested template reference; done means the generated class includes the JsonSubTypes annotations.
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
- 35/100