swagger-api / swagger-api/swagger-codegen

[Java-PlayFramework] Some non imported classes and non used imports

Open
#6,180 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

In the ControllerImplementations of the Api interfaces ObjectMapper neither @Inject are not being imported.

Also, many other packages or classes are being imported when they are not being used.

Swagger-codegen version

2.3.0

Steps to reproduce

Fix in newApi.mustache in the resource folder for language JavaPlayframework.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the newApi.mustache template in the resource folder for JavaPlayframework and inspect the imports generated for ControllerImplementations of API interfaces. Verify the generated Java output against the reported missing ObjectMapper and @Inject imports, then remove imports that are not used. Done means generated controllers have the required imports and no unused package or class imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.