Skip to content

[REQ][KOTLIN-SPRING] FEAT: Spring Declarative HTTP Interface for easy client instantiation #22286

@Picazsoo

Description

@Picazsoo

Is your feature request related to a problem? Please describe.

I would like to provide a library option for kotlin-spring generator that will enable generating of a Spring Declarative Http Interface for simple instantiations of clients that is available in Spring Boot 3+

Describe the solution you'd like

My goal is to provide only the barebones interface classes. Stuff like creating the bean itself via HttpServiceFactory will be left to the user as generating that provides minimal value. I plan on providing option to generate method return types as ResponseEntity<SomeClassType> or just SomeClassType and to support both reactive and non-reactive option.

Describe alternatives you've considered

An alternative currently available in kotlin-spring generator is the spring-cloud library that generates feign clients. However the declarative http interface approach is even simpler and it works with both reactive and non reactive implementations and the developer can freely choose whether to instantiate the interface with either WebClient, RestTemplate, or RestClient.

Additional context

I already have this working in my local project and I think this would be a sensible contribution to this wonderful project.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions