Conversation
…interface Mirror the Java spring generator's clientRegistrationId option (OpenAPITools#22726) for kotlin-spring with library=spring-declarative-http-interface. When set, the generated interfaces are annotated with @ClientRegistrationId and the spring-boot-starter-oauth2-client dependency is added to the Spring Boot 4 build files even if the spec declares no security schemes. The option requires useSpringBoot4=true and is rejected for other libraries, matching the Java generator. Output is unchanged when it is not set. Fixes OpenAPITools#24936
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
clientRegistrationIdtokotlin-springforlibrary=spring-declarative-http-interface, same semantics as the Javaspringoption (#22726).@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.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
clientRegistrationIdoption to thekotlin-springgenerator for thespring-declarative-http-interfacelibrary, mirroring the Javaspringgenerator's option (#22726) and fixing #24936.Behavior
@ClientRegistrationId("<id>")and its import, andspring-boot-starter-oauth2-clientis added to Boot 4 build files even without security schemes.useSpringBoot4=true; any other library setting is rejected with an error.Written for commit 0f8003f. Summary will update on new commits.