Open MelleD opened 8 months ago
I would add that it would be great to have an option to generate just DTOs & interfaces (optionally decorated with @HttpExchange
).
I frequently need advanced customization of REST clients (proxy configuration, Bearer header authorization, ...) and use different implementations depending on the context (WebClient
in reactive apps, RestClient
in servlet, one could prefer the venerable RestTemplate
, ...). So, I'd prefer to provide the REST client bean myself and mix it with a generated @HttpExchange
using HttpServiceProxyFactory
.
In other words, it would be great if we could have some control on what is generated (where the generator stops):
@HttpExchange
(in a client app) or@RequestMapping
(in a server app)I'd be super happy if I could configure the generator to get:
@HttpExchange
at step 3I was also curious about this, and a spring
server generator with a spring-http-interface
sub-template seems to exist already: https://openapi-generator.tech/docs/generators/spring (haven't tested it though)
But a client generator would be awesome - yes please :)
@Bragolgirith That generates a client not a server
Can we also add support in kotlin generator
Is your feature request related to a problem? Please describe.
Spring has its own Http interface description, which will be further developed in the future to use server and client code.
As an example, the Spring Open Feign was already announced as a feature completed and was no longer developed further because Spring continues to maintain and develop its own Http interface. For this reason, a new generator would be great for this.
see https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface
Spring Open Feign The library spring cloud-openfeign [https://github.com/spring-cloud/spring-cloud-openfeign] is in maintenance mode. Still there are bugfixes and fixes for {color:#1f2328}vulnerability fixes but no further development.
Here is the official announcement: [https://spring.io/blog/2022/12/16/spring-cloud-2022-0-0-codename-kilburn-has-been-released]
Spring Cloud OpenFeign feature complete announcement
Thats the new way: [https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface]