File tree Expand file tree Collapse file tree
modules/openapi-generator/src
java/org/openapitools/codegen/languages
resources/JavaSpring/libraries/spring-http-interface
test/java/org/openapitools/codegen/java/spring Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ public SpringCodegen() {
327327 supportedLibraries .put (SPRING_BOOT , "Spring-boot Server application." );
328328 supportedLibraries .put (SPRING_CLOUD_LIBRARY ,
329329 "Spring-Cloud-Feign client with Spring-Boot auto-configured settings." );
330- supportedLibraries .put (SPRING_HTTP_INTERFACE , "Spring 6 HTTP interfaces (testing)" );
330+ supportedLibraries .put (SPRING_HTTP_INTERFACE , "Spring 6 HTTP interfaces (testing). Requires Spring Boot 3 or 4. " );
331331 setLibrary (SPRING_BOOT );
332332 final CliOption library = new CliOption (CodegenConstants .LIBRARY , CodegenConstants .LIBRARY_DESC )
333333 .defaultValue (SPRING_BOOT );
@@ -644,6 +644,10 @@ public void processOpts() {
644644 }
645645 }
646646 } else if (SPRING_HTTP_INTERFACE .equals (library )) {
647+ if (!(isUseSpringBoot3 () || isUseSpringBoot4 ())) {
648+ throw new IllegalArgumentException ("Library '" + SPRING_HTTP_INTERFACE + "' is only supported with Spring Boot 3 or 4" );
649+ }
650+
647651 String httpInterfacesAbstractConfiguratorFile = useHttpServiceProxyFactoryInterfacesConfigurator ?
648652 "httpServiceProxyFactoryInterfacesConfigurator.mustache" :
649653 "httpInterfacesConfiguration.mustache" ;
Original file line number Diff line number Diff line change 11# OpenAPI generated API stub
22
3- [Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/ reference/html/ integration.html#rest-http-interface)
3+ [Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/reference/integration/rest-clients .html#rest-http-interface)
44
55
66## Overview
File renamed without changes.
Original file line number Diff line number Diff line change @@ -6621,6 +6621,7 @@ public void shouldNotHaveDocumentationAnnotationWhenUsingLibrarySpringHttpInterf
66216621 codegen .setOpenAPI (openAPI );
66226622 codegen .setOutputDir (output .getAbsolutePath ());
66236623 codegen .setLibrary (SPRING_HTTP_INTERFACE );
6624+ codegen .setUseSpringBoot3 (true );
66246625 codegen .setAnnotationLibrary (AnnotationLibrary .SWAGGER2 );
66256626 codegen .setDocumentationProvider (DocumentationProvider .SPRINGDOC );
66266627
You can’t perform that action at this time.
0 commit comments