OpenAPITools / OpenAPITools/openapi-generator
[REQ] [Java] [Spring] Logging Spring WebClient calls
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
In a Spring context, the generated client code is based on WebClient. In case of we need to log the http request/response with header and body, the solution is to modify the code which build WebClient. You can see the details in this thread :
https://www.baeldung.com/spring-log-webclient-calls
Describe the solution you'd like
Is it possible that the code generated around the WebClient integrates this need and that the only thing to do if we want to trace the http requests is to configure our application ?
One of the difficulties I see is that the code to enable http traces is different depending on the jetty or netty server.
Describe alternatives you've considered
Additional context
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 by reviewing the generated Spring WebClient client code and the linked Baeldung discussion, then compare how request and response tracing differs between Jetty and Netty. Done means application configuration can enable HTTP request and response logging, including headers and bodies, without modifying generated client code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100