OpenAPITools / OpenAPITools/openapi-generator

[REQ] Feature Request Description

Open
#11,150 0 comments 4 reactions 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 want to use multiple clients with different urls / base-paths with the java-micronaut-client

each client only gets the annotation @Client("${base-path}")

Describe the solution you'd like

Allow the value of the Client annotation to be configurable

Change the generator so it is possible to overwrite the value with e.g. @Client("${my-clients-base-path}")

Describe alternatives you've considered

task myCopy  {
		ant.replaceregexp(match:'base-path', replace:'my-clients-base-path', flags:'g', byline:true) {
			fileset(dir: 'build/generate-resources/main/src/main/java/com/company', includes: '*.java')
		}
}

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 java-micronaut-client generator entry point and where it emits the @Client("${base-path}") annotation. Confirm how generated clients receive configuration, then make the annotation value independently configurable for multiple clients with different URLs or base paths; done means the generated annotation can use a value such as ${my-clients-base-path} without post-generation replacement.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.