OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.49k stars 6.5k forks source link

[REQ] Feign Configuration should be named after the classname #6737

Open AxelHeathnet opened 4 years ago

AxelHeathnet commented 4 years ago

Bug Report Checklist

At the moment each generated feign client has the following configuration:

Description
@Configuration
@EnableConfigurationProperties
public class ClientConfiguration {

This is a grave problem as it only allows for one feign client per spring application: if 2 or more are present the application will crash because it will find 2 identical bean in 2 different packages ("ClientConfiguration" bean, indeed).

openapi-generator version

Present in all versions

Suggest a fix

Simply make "className" available in the clientConfiguration.mustache (dunno why it is not present at the moment...) and alter the template by doing:

@Configuration
@EnableConfigurationProperties
public class {{classname}}ClientConfiguration {
aselim-hrsd commented 9 months ago

Any suggestions or workarounds?

michachr commented 8 months ago

Same Problem.