[kotlin-spring] Add clientRegistrationId option for declarative HTTP interface
Merged
KD
2mo ago+97+97+01234567890123456789-1-1-0123456789
Adds clientRegistrationId to kotlin-spring for library=spring-declarative-http-interface, same semantics as the Java spring option (#22726).
- When set, generated interfaces get
@ClientRegistrationId("<id>")and its import. spring-boot-starter-oauth2-clientis added to the Boot 4 pom/gradle files even if the spec has no security schemes.- Requires
useSpringBoot4=true; rejected for other libraries.
Unset, output is unchanged: both build-file variants for a spec with and without security schemes generate identical trees before and after, so no samples change.
5 new tests in KotlinSpringServerCodegenTest (279 pass); 4 fail without the fix.
Fixes #24936
cc @karismann @Zomzog @andrewemery @4brunu @yutaka0m @stefankoppier @e5l
Summary by cubic
Adds a clientRegistrationId option to the kotlin-spring generator for the spring-declarative-http-interface library, mirroring the Java spring generator's option (#22726) and fixing #24936.
Behavior
- When set, generated interfaces get
@ClientRegistrationId("<id>")and its import, andspring-boot-starter-oauth2-clientis added to Boot 4 build files even without security schemes. - Requires
useSpringBoot4=true; any other library setting is rejected with an error. - Unset, output is unchanged; 5 new tests cover the option.