Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #8602
Closed
Open
Issue created Feb 02, 2021 by Administrator@rootContributor

[REQ] add getWebClient to ApiClient

Created by: PeterBuschSF

Describe the solution you'd like

My company uses spring-cloud-sleuth for transaction tracing. This tool requires that the WebClient be registered as a Bean.

I would prefer to allow the ApiClient to build the WebClient using it's defaults. Then retrieve the completed WebClient from the ApiClient so I can register as a Bean.

ApiClient apiClient = new ApiCient();
WebClient webClient = apiClient.getWebClient();

Describe alternatives you've considered

I currently achieve this by:

  1. Create an ObjectMapper using the steps copied from from the ApiClient's default constructor.
  2. Call ApiClient.buildWebClient with the ObjectMapper to build the WebClient
  3. Call the ApiClient(WebClient, ObjectMapper, DateFormat) constructor to build the ApiClient object.

I realize if I needed to customize the ObjectMapper, DateFormat, and/or WebClient, I might use this option anyway. But I don't have a need for that.

Assignee
Assign to
Time tracking