OpenAPITools / OpenAPITools/openapi-generator

Allow HttpClient configurations in generated API code

Open
#12,437 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
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.

I'm using the auto-generated Kotlin API and I have some HTTP requests that occasionally take more than 10 seconds to process. The auto-generated code does not seem to allow specifying a request timeout on the HttpClient and defaults to 10 seconds which causes my requests to fail in the event that they do go over 10 seconds.

Describe the solution you'd like

I would like the ability to configure the HttpClient in the auto-generator, specifically timeouts.

Describe alternatives you've considered

Currently I am using a modified version of the auto-generated API code to add in a timeout.

Additional context

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

Start by locating the Kotlin client generation entry points and the generated HttpClient setup. Trace how the default 10-second timeout is established and review existing generator tests or Kotlin client templates; done means generated APIs expose the requested HttpClient timeout configuration without requiring manual edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.