OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Is your feature request related to a problem? Please describe.
I'm using openapi-generator to generate a lib (not an app) with continuous integration of an API definition. The issue is that my lib must provide multiple clients of the same API with different basePath and dynamically generated headers. I can't rely on the autowired components generated because there is only one ApiClient and one suite of APIs instanciated. Also ApiClient takes the default RestTemplate bean in the ApplicationContext meaning no API specific header is possible without conflict issues. This last part is quite problematic as it applies for any project that would need multiple ApiClient within the same app.
Describe the solution you'd like
An option to disable the generation of the @Component and @Autowire annotations on the ApiClient and APIs classes for springboot related librairies.
Describe alternatives you've considered
Use sed to hack into the generated classes and remove the annotations...
Is your feature request related to a problem? Please describe.
I'm using openapi-generator to generate a lib (not an app) with continuous integration of an API definition. The issue is that my lib must provide multiple clients of the same API with different basePath and dynamically generated headers. I can't rely on the autowired components generated because there is only one ApiClient and one suite of APIs instanciated. Also
ApiClient
takes the defaultRestTemplate
bean in theApplicationContext
meaning no API specific header is possible without conflict issues. This last part is quite problematic as it applies for any project that would need multiple ApiClient within the same app.Describe the solution you'd like
An option to disable the generation of the
@Component
and@Autowire
annotations on the ApiClient and APIs classes for springboot related librairies.Describe alternatives you've considered
Use sed to hack into the generated classes and remove the annotations...