swagger-api / swagger-api/swagger-codegen
[Java] Controller not recognized when using LoggingAspect(AspectJ)
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The controller cannot be seen in swagger ui when using aspectj for logging.
The problem is within the proxying mechanism of JDK proxy, the @Controller annotation is placed in the implementation class and thus, not being seen in the JDK generated proxy.
Swagger-codegen version
2.2.1
Steps to reproduce
Use AspectJ to log method ins and outs for tracing the controller
Suggest a Fix
Add the Controller annotation in the generated interface to support AspectJ logging in the controller.
commit
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 Java server-stub generation path and the controller interface produced for JDK proxies. Reproduce the AspectJ logging setup described in the issue and compare annotation visibility on the implementation and generated interface. Done means the controller is recognized in Swagger UI when AspectJ logging is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100