diff --git a/.github/workflows/samples-spring-jdk17.yaml b/.github/workflows/samples-spring-jdk17.yaml
index a72a99141c8d..9e48ff2f74d7 100644
--- a/.github/workflows/samples-spring-jdk17.yaml
+++ b/.github/workflows/samples-spring-jdk17.yaml
@@ -4,7 +4,10 @@ on:
push:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
+ - samples/openapi3/client/petstore/spring-cloud-4-with-optional
+ - samples/client/petstore/spring-http-interface-springboot-4
- samples/openapi3/server/petstore/springboot-3
+ - samples/openapi3/server/petstore/springboot-4
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
@@ -15,7 +18,10 @@ on:
pull_request:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
+ - samples/openapi3/client/petstore/spring-cloud-4-with-optional
+ - samples/client/petstore/spring-http-interface-springboot-4
- samples/openapi3/server/petstore/springboot-3
+ - samples/openapi3/server/petstore/springboot-4
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
@@ -33,8 +39,11 @@ jobs:
sample:
# clients
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
+ - samples/openapi3/client/petstore/spring-cloud-4-with-optional
+ - samples/client/petstore/spring-http-interface-springboot-4
# servers
- samples/openapi3/server/petstore/springboot-3
+ - samples/openapi3/server/petstore/springboot-4
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
diff --git a/bin/configs/spring-boot-4.yaml b/bin/configs/spring-boot-4.yaml
new file mode 100644
index 000000000000..7185f572670c
--- /dev/null
+++ b/bin/configs/spring-boot-4.yaml
@@ -0,0 +1,17 @@
+generatorName: spring
+outputDir: samples/openapi3/server/petstore/springboot-4
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+additionalProperties:
+ groupId: org.openapitools.openapi3
+ documentationProvider: springdoc
+ artifactId: springboot
+ snapshotVersion: "true"
+ useSpringBoot4: true
+ useJackson3: true
+ useBeanValidation: true
+ withXml: true
+ hideGenerationTimestamp: "true"
+ generateConstructorWithAllArgs: true
+ generateBuilders: true
+ openApiNullable: false
diff --git a/bin/configs/spring-cloud-4-with-optional.yaml b/bin/configs/spring-cloud-4-with-optional.yaml
new file mode 100644
index 000000000000..1e474a40a122
--- /dev/null
+++ b/bin/configs/spring-cloud-4-with-optional.yaml
@@ -0,0 +1,18 @@
+generatorName: spring
+library: spring-cloud
+outputDir: samples/openapi3/client/petstore/spring-cloud-4-with-optional
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+additionalProperties:
+ groupId: org.openapitools.openapi3
+ documentationProvider: springdoc
+ artifactId: spring-cloud-oas4
+ useSpringBoot4: "true"
+ useJackson3: true
+ openApiNullable: false
+ dateLibrary: "java8"
+ useOptional: "true"
+ useSwaggerUI: "false"
+ hideGenerationTimestamp: "true"
+ documentationProvider: none
+ #optionalAcceptNullable: "false" # default to true
diff --git a/bin/configs/spring-http-interface-springboot-4.yaml b/bin/configs/spring-http-interface-springboot-4.yaml
new file mode 100644
index 000000000000..6bfd197f0f60
--- /dev/null
+++ b/bin/configs/spring-http-interface-springboot-4.yaml
@@ -0,0 +1,21 @@
+generatorName: spring
+library: spring-http-interface
+outputDir: samples/client/petstore/spring-http-interface-springboot-4
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+additionalProperties:
+ artifactId: spring-http-interface
+ snapshotVersion: "true"
+ hideGenerationTimestamp: "true"
+ modelNameSuffix: 'Dto'
+ generatedConstructorWithRequiredArgs: "false"
+ # documentation provider should be ignored
+ documentationProvider: "springdoc"
+ # annotation provider should be ignored
+ annotationLibrary: "swagger2"
+ # validation should be ignored
+ useBeanValidation: "true"
+ performBeanValidation: "true"
+ useSpringBoot4: "true"
+ useJackson3: true
+ openApiNullable: false
diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md
index 0651cc84e31d..41236498fde2 100644
--- a/docs/generators/java-camel.md
+++ b/docs/generators/java-camel.md
@@ -107,12 +107,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false|
|useFeignClientContextId|Whether to generate Feign client with contextId parameter.| |true|
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
+|useJackson3|Set it in order to use jackson 3 dependencies (only allowed when `useSpringBoot4` is set and incompatible with `openApiNullable`).| |false|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |true|
|useOptional|Use Optional container for optional parameters| |false|
|useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true|
|useSealed|Whether to generate sealed model interfaces and classes| |false|
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
+|useSpringBoot4|Generate code and provide dependencies for use with Spring Boot 4.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
|useSpringBuiltInValidation|Disable `@Validated` at the class level when using built-in validation.| |false|
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index 854118300bda..3c2a659fef5f 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -100,12 +100,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false|
|useFeignClientContextId|Whether to generate Feign client with contextId parameter.| |true|
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
+|useJackson3|Set it in order to use jackson 3 dependencies (only allowed when `useSpringBoot4` is set and incompatible with `openApiNullable`).| |false|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |true|
|useOptional|Use Optional container for optional parameters| |false|
|useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true|
|useSealed|Whether to generate sealed model interfaces and classes| |false|
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
+|useSpringBoot4|Generate code and provide dependencies for use with Spring Boot 4.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
|useSpringBuiltInValidation|Disable `@Validated` at the class level when using built-in validation.| |false|
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
index 2c3c584e931a..831e859fd0ba 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
@@ -93,6 +93,7 @@ public class SpringCodegen extends AbstractJavaCodegen
public static final String GENERATE_GENERIC_RESPONSE_ENTITY = "generateGenericResponseEntity";
public static final String USE_ENUM_CASE_INSENSITIVE = "useEnumCaseInsensitive";
public static final String USE_SPRING_BOOT3 = "useSpringBoot3";
+ public static final String USE_SPRING_BOOT4 = "useSpringBoot4";
public static final String REQUEST_MAPPING_OPTION = "requestMappingMode";
public static final String USE_REQUEST_MAPPING_ON_CONTROLLER = "useRequestMappingOnController";
public static final String USE_REQUEST_MAPPING_ON_INTERFACE = "useRequestMappingOnInterface";
@@ -101,6 +102,10 @@ public class SpringCodegen extends AbstractJavaCodegen
public static final String USE_SPRING_BUILT_IN_VALIDATION = "useSpringBuiltInValidation";
public static final String USE_DEDUCTION_FOR_ONE_OF_INTERFACES = "useDeductionForOneOfInterfaces";
public static final String SPRING_API_VERSION = "springApiVersion";
+ public static final String USE_JACKSON_3 = "useJackson3";
+ public static final String JACKSON2_PACKAGE = "com.fasterxml.jackson";
+ public static final String JACKSON3_PACKAGE = "tools.jackson";
+ public static final String JACKSON_PACKAGE = "jacksonPackage";
@Getter
public enum RequestMappingMode {
@@ -154,6 +159,8 @@ public enum RequestMappingMode {
@Setter protected boolean useEnumCaseInsensitive = false;
@Getter @Setter
protected boolean useSpringBoot3 = false;
+ @Getter @Setter
+ protected boolean useSpringBoot4 = false;
protected boolean generatedConstructorWithRequiredArgs = true;
@Getter @Setter
protected RequestMappingMode requestMappingMode = RequestMappingMode.controller;
@@ -163,6 +170,8 @@ public enum RequestMappingMode {
protected boolean useSpringBuiltInValidation = false;
@Getter @Setter
protected boolean useDeductionForOneOfInterfaces = false;
+ @Getter @Setter
+ protected boolean useJackson3 = false;
public SpringCodegen() {
super();
@@ -281,6 +290,10 @@ public SpringCodegen() {
cliOptions.add(CliOption.newBoolean(USE_SPRING_BOOT3,
"Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.",
useSpringBoot3));
+ cliOptions.add(CliOption.newBoolean(USE_SPRING_BOOT4,
+ "Generate code and provide dependencies for use with Spring Boot 4.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.",
+ useSpringBoot4));
+ cliOptions.add(CliOption.newBoolean(USE_JACKSON_3, "Set it in order to use jackson 3 dependencies (only allowed when `" + USE_SPRING_BOOT4 + "` is set and incompatible with `"+OPENAPI_NULLABLE+"`).", useJackson3));
cliOptions.add(CliOption.newBoolean(GENERATE_CONSTRUCTOR_WITH_REQUIRED_ARGS,
"Whether to generate constructors with required args for models",
generatedConstructorWithRequiredArgs));
@@ -463,8 +476,13 @@ public void processOpts() {
additionalProperties.put("springHttpStatus", new SpringHttpStatusLambda());
convertPropertyToBooleanAndWriteBack(USE_ENUM_CASE_INSENSITIVE, this::setUseEnumCaseInsensitive);
+ convertPropertyToBooleanAndWriteBack(USE_JACKSON_3, this::setUseJackson3);
convertPropertyToBooleanAndWriteBack(USE_SPRING_BOOT3, this::setUseSpringBoot3);
- if (isUseSpringBoot3()) {
+ convertPropertyToBooleanAndWriteBack(USE_SPRING_BOOT4, this::setUseSpringBoot4);
+ if(isUseSpringBoot3() && isUseSpringBoot4()){
+ throw new IllegalArgumentException("Choose between Spring Boot 3 and Spring Boot 4");
+ }
+ if (isUseSpringBoot3() || isUseSpringBoot4()) {
if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) {
throw new IllegalArgumentException(DocumentationProvider.SPRINGFOX.getPropertyName() + " is not supported with Spring Boot > 3.x");
}
@@ -474,15 +492,30 @@ public void processOpts() {
useJakartaEe = true;
applyJakartaPackage();
}
+ if(isUseJackson3() && !isUseSpringBoot4()){
+ throw new IllegalArgumentException("useJackson3 is only available with Spring Boot >= 4");
+ }
+ if(isUseJackson3() && isOpenApiNullable()){
+ throw new IllegalArgumentException("openApiNullable cannot be set with useJackson3");
+ }
+ if(this.useJackson3){
+ this.applyJackson3Package();
+ } else {
+ this.applyJackson2Package();
+ }
convertPropertyToStringAndWriteBack(RESOURCE_FOLDER, this::setResourceFolder);
+
+ // override parent one
+ importMapping.put("JsonDeserialize", (useJackson3 ? JACKSON3_PACKAGE : JACKSON2_PACKAGE) + ".databind.annotation.JsonDeserialize");
+
typeMapping.put("file", "org.springframework.core.io.Resource");
importMapping.put("Nullable", "org.springframework.lang.Nullable");
importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource");
importMapping.put("DateTimeFormat", "org.springframework.format.annotation.DateTimeFormat");
importMapping.put("ApiIgnore", "springfox.documentation.annotations.ApiIgnore");
importMapping.put("ParameterObject", "org.springdoc.api.annotations.ParameterObject");
- if (isUseSpringBoot3()) {
+ if (isUseSpringBoot3() || isUseSpringBoot4()) {
importMapping.put("ParameterObject", "org.springdoc.core.annotations.ParameterObject");
}
@@ -491,7 +524,9 @@ public void processOpts() {
additionalProperties.put("delegate-method", true);
}
- if (isUseSpringBoot3()) {
+ if (isUseSpringBoot4()) {
+ supportingFiles.add(new SupportingFile("pom-sb4.mustache", "", "pom.xml"));
+ } else if (isUseSpringBoot3()) {
supportingFiles.add(new SupportingFile("pom-sb3.mustache", "", "pom.xml"));
} else {
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
@@ -657,6 +692,14 @@ public void processOpts() {
supportsAdditionalPropertiesWithComposedSchema = true;
}
+ protected void applyJackson2Package() {
+ writePropertyBack(JACKSON_PACKAGE, JACKSON2_PACKAGE);
+ }
+
+ protected void applyJackson3Package() {
+ writePropertyBack(JACKSON_PACKAGE, JACKSON3_PACKAGE);
+ }
+
private boolean supportLibraryUseTags() {
return SPRING_BOOT.equals(library) || SPRING_CLOUD_LIBRARY.equals(library);
}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache
index 258392223cd6..b54cff885485 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache
@@ -4,7 +4,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
{{#sourceDocumentationProvider}}
-import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
+import {{jacksonPackage}}.dataformat.yaml.YAMLMapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.util.StreamUtils;
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/RFC3339DateFormat.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/RFC3339DateFormat.mustache
index b1a5cb59e550..f1028f237da5 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/RFC3339DateFormat.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/RFC3339DateFormat.mustache
@@ -1,6 +1,6 @@
package {{basePackage}};
-import com.fasterxml.jackson.databind.util.StdDateFormat;
+import {{jacksonPackage}}.databind.util.StdDateFormat;
import java.text.DateFormat;
import java.text.FieldPosition;
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/application.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/application.mustache
index f8740df9541d..e38e60151822 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/application.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/application.mustache
@@ -1,6 +1,11 @@
server.port={{serverPort}}
spring.jackson.date-format={{basePackage}}.RFC3339DateFormat
+{{#useSpringBoot4}}
+spring.jackson.datatype.datetime.WRITE_DATES_AS_TIMESTAMPS=false
+{{/useSpringBoot4}}
+{{^useSpringBoot4}}
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
+{{/useSpringBoot4}}
{{#virtualService}}
virtualan.datasource.driver-class-name=org.hsqldb.jdbcDriver
virtualan.datasource.jdbcurl=jdbc:hsqldb:mem:dataSource
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom-sb3.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom-sb3.mustache
index c5743b0a5110..747c9272cc1a 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom-sb3.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom-sb3.mustache
@@ -7,15 +7,14 @@
{{artifactVersion}}
17
- ${java.version}
- ${java.version}
+ ${java.version}
UTF-8
{{#springDocDocumentationProvider}}
2.6.0
{{/springDocDocumentationProvider}}
{{^springDocDocumentationProvider}}
{{#swagger2AnnotationLibrary}}
- 2.2.22
+ 2.2.42
{{/swagger2AnnotationLibrary}}
{{/springDocDocumentationProvider}}
{{#useSwaggerUI}}
@@ -36,25 +35,11 @@
org.springframework.boot
spring-boot-starter-parent
- 3.1.3
+ 3.3.13
{{/parentOverridden}}
-
-
- repository.spring.milestone
- Spring Milestone Repository
- https://repo.spring.io/milestone
-
-
-
-
- spring-milestones
- https://repo.spring.io/milestone
-
-
-
src/main/java
@@ -179,10 +164,6 @@
jsr305
3.0.2
-
- com.fasterxml.jackson.dataformat
- jackson-dataformat-yaml
-
{{#withXml}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom-sb4.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom-sb4.mustache
new file mode 100644
index 000000000000..fc288bbb36c0
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom-sb4.mustache
@@ -0,0 +1,251 @@
+
+ 4.0.0
+ {{groupId}}
+ {{artifactId}}
+ jar
+ {{artifactId}}
+ {{artifactVersion}}
+
+ 17
+ ${java.version}
+ UTF-8
+ {{#springDocDocumentationProvider}}
+ 2.6.0
+ {{/springDocDocumentationProvider}}
+ {{^springDocDocumentationProvider}}
+ {{#swagger2AnnotationLibrary}}
+ 2.2.42
+ {{/swagger2AnnotationLibrary}}
+ {{/springDocDocumentationProvider}}
+ {{#useSwaggerUI}}
+ 5.17.14
+ {{/useSwaggerUI}}
+ {{#virtualService}}
+ 2.5.5
+ {{/virtualService}}
+
+{{#parentOverridden}}
+
+ {{{parentGroupId}}}
+ {{{parentArtifactId}}}
+ {{{parentVersion}}}
+
+{{/parentOverridden}}
+{{^parentOverridden}}
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 4.0.1
+
+
+{{/parentOverridden}}
+
+
+ src/main/java
+
+ {{^interfaceOnly}}
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ {{#classifier}}
+ {{{classifier}}}
+ {{/classifier}}
+ {{#lombok}}
+
+
+ org.projectlombok
+ lombok
+
+
+ {{/lombok}}
+
+
+ {{/interfaceOnly}}
+ {{#interfaceOnly}}
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-sources
+
+ jar
+
+
+
+
+ {{/interfaceOnly}}
+ {{#apiFirst}}
+
+ org.openapitools
+ openapi-generator-maven-plugin
+ {{{generatorVersion}}}
+
+
+
+ generate
+
+
+ src/main/resources/openapi.yaml
+ spring
+ {{{apiPackage}}}
+ {{{modelPackage}}}
+ false
+ {{#modelNamePrefix}}
+ {{{.}}}
+ {{/modelNamePrefix}}
+ {{#modelNameSuffix}}
+ {{{.}}}
+ {{/modelNameSuffix}}
+
+ {{#configOptions}}
+ <{{left}}>{{right}}{{left}}>
+ {{/configOptions}}
+
+
+
+
+
+ {{/apiFirst}}
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web{{#reactive}}flux{{/reactive}}{{^reactive}}mvc{{/reactive}}
+
+
+ org.springframework.boot
+ spring-boot-starter-{{#reactive}}web{{/reactive}}{{^reactive}}rest{{/reactive}}client
+
+
+ org.springframework.data
+ spring-data-commons
+
+ {{#springDocDocumentationProvider}}
+
+ {{#useSwaggerUI}}
+
+ org.springdoc
+ springdoc-openapi-starter-{{#reactive}}webflux{{/reactive}}{{^reactive}}webmvc{{/reactive}}-ui
+ ${springdoc.version}
+
+ {{/useSwaggerUI}}
+ {{^useSwaggerUI}}
+
+ org.springdoc
+ springdoc-openapi-starter-{{#reactive}}webflux{{/reactive}}{{^reactive}}webmvc{{/reactive}}-api
+ ${springdoc.version}
+
+ {{/useSwaggerUI}}
+ {{/springDocDocumentationProvider}}
+ {{#useSwaggerUI}}
+ {{^springDocDocumentationProvider}}
+
+ org.webjars
+ swagger-ui
+ ${swagger-ui.version}
+
+
+ org.webjars
+ webjars-locator-core
+
+ {{/springDocDocumentationProvider}}
+ {{/useSwaggerUI}}
+ {{^springDocDocumentationProvider}}
+ {{#swagger2AnnotationLibrary}}
+
+ io.swagger.core.v3
+ swagger-annotations
+ ${swagger-annotations.version}
+
+ {{/swagger2AnnotationLibrary}}
+ {{/springDocDocumentationProvider}}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+ {{#withXml}}
+
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+ {{jacksonPackage}}.dataformat
+ jackson-dataformat-xml
+
+ {{/withXml}}
+ {{^useJackson3}}
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+ {{/useJackson3}}
+ {{#joda}}
+
+ {{jacksonPackage}}.datatype
+ jackson-datatype-joda
+
+ {{/joda}}
+ {{#openApiNullable}}
+
+ org.openapitools
+ jackson-databind-nullable
+ 0.2.8
+
+ {{/openApiNullable}}
+{{#useBeanValidation}}
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+{{/useBeanValidation}}
+{{#virtualService}}
+
+
+ io.virtualan
+ virtualan-plugin
+ ${virtualan.version}
+
+
+
+ org.hsqldb
+ hsqldb
+
+
+{{/virtualService}}
+{{#hateoas}}
+
+
+ org.springframework.boot
+ spring-boot-starter-hateoas
+
+{{/hateoas}}
+{{#lombok}}
+
+ org.projectlombok
+ lombok
+ true
+
+{{/lombok}}
+
+ {{jacksonPackage}}.core
+ jackson-databind
+
+
+ org.springframework.boot
+ spring-boot-starter-web{{#reactive}}flux{{/reactive}}{{^reactive}}mvc{{/reactive}}-test
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-{{#reactive}}web{{/reactive}}{{^reactive}}rest{{/reactive}}client
+ test
+
+
+
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
index 42634b2bf684..38c29f3648a3 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
@@ -194,10 +194,6 @@
jsr305
3.0.2
-
- com.fasterxml.jackson.dataformat
- jackson-dataformat-yaml
-
{{#withXml}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom-sb3.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom-sb3.mustache
index 0e2521244ed7..d62bb06bf8a9 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom-sb3.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom-sb3.mustache
@@ -6,14 +6,8 @@
{{artifactId}}
{{artifactVersion}}
- {{#useSealed}}
17
- {{/useSealed}}
- {{^useSealed}}
- 8
- {{/useSealed}}
- ${java.version}
- ${java.version}
+ ${java.version}
UTF-8
{{#springDocDocumentationProvider}}
2.2.0
@@ -35,19 +29,11 @@
org.springframework.boot
spring-boot-starter-parent
- 3.1.3
+ 3.3.13
{{/parentOverridden}}
-
-
- repository.spring.milestone
- Spring Milestone Repository
- https://repo.spring.io/milestone
-
-
-
src/main/java
{{#interfaceOnly}}
@@ -72,7 +58,7 @@
org.springframework.cloud
spring-cloud-starter-parent
- 2022.0.0
+ 2023.0.0
pom
import
@@ -113,9 +99,6 @@
org.springframework.security
spring-security-oauth2-client
- {{^parentOverridden}}
- 6.1.1
- {{/parentOverridden}}
{{#withXml}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom-sb4.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom-sb4.mustache
new file mode 100644
index 000000000000..849ed1f2690f
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom-sb4.mustache
@@ -0,0 +1,167 @@
+
+ 4.0.0
+ {{groupId}}
+ {{artifactId}}
+ jar
+ {{artifactId}}
+ {{artifactVersion}}
+
+ 17
+ ${java.version}
+ UTF-8
+ {{#springDocDocumentationProvider}}
+ 2.2.0
+ {{/springDocDocumentationProvider}}
+ {{^springDocDocumentationProvider}}
+ {{#swagger2AnnotationLibrary}}
+ 2.2.15
+ {{/swagger2AnnotationLibrary}}
+ {{/springDocDocumentationProvider}}
+
+{{#parentOverridden}}
+
+ {{{parentGroupId}}}
+ {{{parentArtifactId}}}
+ {{{parentVersion}}}
+
+{{/parentOverridden}}
+{{^parentOverridden}}
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 4.0.1
+
+
+{{/parentOverridden}}
+
+
+ src/main/java
+ {{#interfaceOnly}}
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-sources
+
+ jar
+
+
+
+
+ {{/interfaceOnly}}
+
+
+{{^parentOverridden}}
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ 2025.1.0
+ pom
+ import
+
+
+
+
+{{/parentOverridden}}
+
+ {{#springDocDocumentationProvider}}
+
+
+ org.springdoc
+ springdoc-openapi-starter-{{#reactive}}webflux{{/reactive}}{{^reactive}}webmvc{{/reactive}}-ui
+ ${springdoc.version}
+
+ {{/springDocDocumentationProvider}}
+ {{^springDocDocumentationProvider}}
+ {{#swagger2AnnotationLibrary}}
+
+ io.swagger.core.v3
+ swagger-annotations
+ ${swagger-annotations.version}
+
+ {{/swagger2AnnotationLibrary}}
+ {{/springDocDocumentationProvider}}
+
+
+ com.google.code.findbugs
+ jsr305
+ {{^parentOverridden}}
+ 3.0.2
+ {{/parentOverridden}}
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ org.springframework.security
+ spring-security-oauth2-client
+ {{^parentOverridden}}
+ 6.1.1
+ {{/parentOverridden}}
+
+
+ {{jacksonPackage}}.core
+ jackson-databind
+
+ {{#withXml}}
+
+
+ {{jacksonPackage}}.dataformat
+ jackson-dataformat-xml
+
+ {{/withXml}}
+ {{^useJackson3}}
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+ {{/useJackson3}}
+ {{#joda}}
+
+ {{jacksonPackage}}.datatype
+ jackson-datatype-joda
+
+ {{/joda}}
+ {{#openApiNullable}}
+
+ org.openapitools
+ jackson-databind-nullable
+ {{^parentOverridden}}
+ 0.2.8
+ {{/parentOverridden}}
+
+ {{/openApiNullable}}
+ {{#hateoas}}
+
+ org.springframework.boot
+ spring-boot-starter-hateoas
+
+ {{/hateoas}}
+ {{#lombok}}
+
+ org.projectlombok
+ lombok
+ true
+
+ {{/lombok}}
+ {{#useBeanValidation}}
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+ {{/useBeanValidation}}
+
+ org.springframework.data
+ spring-data-commons
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/README.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/README.mustache
index 6cc33662560b..f493d21d442f 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/README.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/README.mustache
@@ -1,6 +1,6 @@
# OpenAPI generated API stub
-[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface)
+[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface)
## Overview
@@ -9,13 +9,13 @@ By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an AP
This is an example of building API stub interfaces in Java using the Spring framework.
The stubs generated can be used in your existing Spring application for HTTP integration with other REST services
-To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor
+To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `{{#reactive}}WebClient{{/reactive}}{{^reactive}}RestClient{{/reactive}}` instance via constructor
```java
@Configuration
public class MyConfiguration extends {{configPackage}}.HttpInterfacesAbstractConfigurator {
- public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance
- super(myWebClient);
+ public MyConfiguration({{#reactive}}WebClient{{/reactive}}{{^reactive}}RestClient{{/reactive}} client) {
+ super(client);
}
}
```
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache
index 9858a2feb8a5..d6d1855f28e0 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache
@@ -12,23 +12,34 @@ import {{apiPackage}}.{{classname}};
{{/apiInfo}}
import org.springframework.context.annotation.Bean;
+{{#reactive}}
import org.springframework.web.reactive.function.client.WebClient;
import org.springframework.web.reactive.function.client.support.WebClientAdapter;
+{{/reactive}}
+{{^reactive}}
+import org.springframework.web.client.RestClient;
+import org.springframework.web.client.support.RestClientAdapter;
+{{/reactive}}
import org.springframework.web.service.invoker.HttpServiceProxyFactory;
public abstract class HttpInterfacesAbstractConfigurator {
- private final WebClient webClient;
+ private final {{#reactive}}WebClient{{/reactive}}{{^reactive}}RestClient{{/reactive}} client;
- public HttpInterfacesAbstractConfigurator(final WebClient webClient) {
- this.webClient = webClient;
+ public HttpInterfacesAbstractConfigurator(final {{#reactive}}WebClient{{/reactive}}{{^reactive}}RestClient{{/reactive}} client) {
+ this.client = client;
}
{{#apiInfo}}
{{#apis}}
@Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}")
{{classname}} {{classVarName}}HttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ {{#reactive}}
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
+ {{/reactive}}
+ {{^reactive}}
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build();
+ {{/reactive}}
return factory.createClient({{classname}}.class);
}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache
new file mode 100644
index 000000000000..e617a22895ac
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache
@@ -0,0 +1,107 @@
+
+ 4.0.0
+ {{groupId}}
+ {{artifactId}}
+ jar
+ {{artifactId}}
+ {{artifactVersion}}
+
+ 17
+ UTF-8
+
+{{#parentOverridden}}
+
+ {{{parentGroupId}}}
+ {{{parentArtifactId}}}
+ {{{parentVersion}}}
+
+{{/parentOverridden}}
+{{^parentOverridden}}
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 4.0.1
+
+
+{{/parentOverridden}}
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+ ${java.version}
+ ${java.version}
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-{{#reactive}}web{{/reactive}}{{^reactive}}rest{{/reactive}}client
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+ jakarta.validation
+ jakarta.validation-api
+
+ {{#withXml}}
+
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+ {{jacksonPackage}}.dataformat
+ jackson-dataformat-xml
+
+ {{/withXml}}
+ {{^useJackson3}}
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+ {{/useJackson3}}
+ {{#openApiNullable}}
+
+ org.openapitools
+ jackson-databind-nullable
+ 0.2.8
+
+ {{/openApiNullable}}
+ {{#lombok}}
+
+ org.projectlombok
+ lombok
+ true
+
+ {{/lombok}}
+
+ org.springframework.boot
+ spring-boot-starter-{{#reactive}}web{{/reactive}}{{^reactive}}rest{{/reactive}}client-test
+ test
+
+
+
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom.mustache
index 697f819765d6..7a131774517c 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom.mustache
@@ -20,7 +20,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.1.3
+ 3.3.13
{{/parentOverridden}}
@@ -55,7 +55,7 @@
org.springframework.boot
- spring-boot-starter-webflux
+ spring-boot-starter-{{#reactive}}webflux{{/reactive}}{{^reactive}}web{{/reactive}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache
index 44a4717a69d4..7655d0701c0b 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache
@@ -23,9 +23,9 @@ import org.hibernate.validator.constraints.*;
{{/performBeanValidation}}
{{#jackson}}
{{#withXml}}
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import {{jacksonPackage}}.dataformat.xml.annotation.JacksonXmlRootElement;
+import {{jacksonPackage}}.dataformat.xml.annotation.JacksonXmlProperty;
+import {{jacksonPackage}}.dataformat.xml.annotation.JacksonXmlElementWrapper;
{{/withXml}}
{{/jackson}}
{{#swagger2AnnotationLibrary}}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
index ac819033d71e..3f778bbea626 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
@@ -26,6 +26,7 @@
import io.swagger.v3.oas.models.servers.Server;
import io.swagger.v3.parser.core.models.ParseOptions;
import org.apache.commons.lang3.StringUtils;
+import org.assertj.core.api.Assertions;
import org.assertj.core.api.MapAssert;
import org.openapitools.codegen.*;
import org.openapitools.codegen.config.CodegenConfigurator;
@@ -6298,4 +6299,111 @@ public void shouldAddNullableImportForArrayTypeModels() throws IOException {
.hasImports("org.springframework.lang.Nullable");
}
+ @Test
+ public void shouldRefuseJackson3WithoutSpringboot4() throws IOException {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ output.deleteOnExit();
+
+ final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-echo.yaml");
+ final SpringCodegen codegen = new SpringCodegen();
+ codegen.setOpenAPI(openAPI);
+ codegen.setOutputDir(output.getAbsolutePath());
+
+ codegen.additionalProperties().put(SpringCodegen.USE_SPRING_BOOT4, "false");
+ codegen.additionalProperties().put(SpringCodegen.USE_JACKSON_3, "true");
+
+ ClientOptInput input = new ClientOptInput();
+ input.openAPI(openAPI);
+ input.config(codegen);
+
+ Generator generator = new DefaultGenerator()
+ .opts(input);
+
+ Assertions.assertThatExceptionOfType(IllegalArgumentException.class)
+ .isThrownBy(generator::generate);
+ }
+
+ @Test
+ public void shouldRefuseOpenApiNullableWithJackson3() throws IOException {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ output.deleteOnExit();
+
+ final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-echo.yaml");
+ final SpringCodegen codegen = new SpringCodegen();
+ codegen.setOpenAPI(openAPI);
+ codegen.setOutputDir(output.getAbsolutePath());
+
+ codegen.additionalProperties().put(SpringCodegen.USE_SPRING_BOOT4, "true");
+ codegen.additionalProperties().put(SpringCodegen.USE_JACKSON_3, "true");
+ codegen.additionalProperties().put(SpringCodegen.OPENAPI_NULLABLE, "true");
+
+ ClientOptInput input = new ClientOptInput();
+ input.openAPI(openAPI);
+ input.config(codegen);
+
+ Generator generator = new DefaultGenerator()
+ .opts(input);
+
+ Assertions.assertThatExceptionOfType(IllegalArgumentException.class)
+ .isThrownBy(generator::generate);
+ }
+
+ @Test
+ public void shouldImportJackson2JsonDeserializeForUniqueItemsWhenJackson3NotSet() throws IOException {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ output.deleteOnExit();
+ String outputPath = output.getAbsolutePath().replace('\\', '/');
+
+ final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-echo.yaml");
+ final SpringCodegen codegen = new SpringCodegen();
+ codegen.setOpenAPI(openAPI);
+ codegen.setOutputDir(output.getAbsolutePath());
+
+ codegen.additionalProperties().put(SpringCodegen.USE_SPRING_BOOT4, "true");
+ codegen.additionalProperties().put(SpringCodegen.USE_JACKSON_3, "false");
+
+ ClientOptInput input = new ClientOptInput();
+ input.openAPI(openAPI);
+ input.config(codegen);
+
+ DefaultGenerator generator = new DefaultGenerator();
+ generator.setGenerateMetadata(false); // skip metadata generation
+
+ Map files = generator.opts(input).generate().stream()
+ .collect(Collectors.toMap(File::getName, Function.identity()));
+
+ JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/model/Pet.java"))
+ .hasImports("com.fasterxml.jackson.databind.annotation.JsonDeserialize");
+ }
+
+ @Test
+ public void shouldImportJackson3JsonDeserializeForUniqueItemsWhenJackson3Set() throws IOException {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ output.deleteOnExit();
+ String outputPath = output.getAbsolutePath().replace('\\', '/');
+
+ final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-echo.yaml");
+ final SpringCodegen codegen = new SpringCodegen();
+ codegen.setOpenAPI(openAPI);
+ codegen.setOutputDir(output.getAbsolutePath());
+
+
+ codegen.additionalProperties().put(SpringCodegen.USE_SPRING_BOOT4, "true");
+ codegen.additionalProperties().put(SpringCodegen.USE_JACKSON_3, "true");
+ codegen.additionalProperties().put(SpringCodegen.OPENAPI_NULLABLE, "false");
+
+ ClientOptInput input = new ClientOptInput();
+ input.openAPI(openAPI);
+ input.config(codegen);
+
+ DefaultGenerator generator = new DefaultGenerator();
+ generator.setGenerateMetadata(false); // skip metadata generation
+
+ Map files = generator.opts(input).generate().stream()
+ .collect(Collectors.toMap(File::getName, Function.identity()));
+
+ JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/model/Pet.java"))
+ .hasImports("tools.jackson.databind.annotation.JsonDeserialize");
+ }
+
}
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/README.md b/samples/client/petstore/spring-http-interface-noResponseEntity/README.md
index d947e03a2484..3f489eac9b72 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/README.md
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/README.md
@@ -1,6 +1,6 @@
# OpenAPI generated API stub
-[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface)
+[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface)
## Overview
@@ -9,13 +9,13 @@ By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an AP
This is an example of building API stub interfaces in Java using the Spring framework.
The stubs generated can be used in your existing Spring application for HTTP integration with other REST services
-To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor
+To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `RestClient` instance via constructor
```java
@Configuration
public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator {
- public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance
- super(myWebClient);
+ public MyConfiguration(RestClient client) {
+ super(client);
}
}
```
\ No newline at end of file
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml b/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml
index 62f45ef5f600..877bb4bb4ab2 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml
@@ -12,7 +12,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.1.3
+ 3.3.13
@@ -46,7 +46,7 @@
org.springframework.boot
- spring-boot-starter-webflux
+ spring-boot-starter-web
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
index f9e6dca33a9a..887394ef16a5 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
@@ -13,51 +13,51 @@
import org.openapitools.api.UserApi;
import org.springframework.context.annotation.Bean;
-import org.springframework.web.reactive.function.client.WebClient;
-import org.springframework.web.reactive.function.client.support.WebClientAdapter;
+import org.springframework.web.client.RestClient;
+import org.springframework.web.client.support.RestClientAdapter;
import org.springframework.web.service.invoker.HttpServiceProxyFactory;
public abstract class HttpInterfacesAbstractConfigurator {
- private final WebClient webClient;
+ private final RestClient client;
- public HttpInterfacesAbstractConfigurator(final WebClient webClient) {
- this.webClient = webClient;
+ public HttpInterfacesAbstractConfigurator(final RestClient client) {
+ this.client = client;
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake")
AnotherFakeApi anotherFakeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build();
return factory.createClient(AnotherFakeApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake")
FakeApi fakeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build();
return factory.createClient(FakeApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123")
FakeClassnameTags123Api fakeClassnameTags123HttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build();
return factory.createClient(FakeClassnameTags123Api.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet")
PetApi petHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build();
return factory.createClient(PetApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store")
StoreApi storeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build();
return factory.createClient(StoreApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user")
UserApi userHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build();
return factory.createClient(UserApi.class);
}
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/README.md b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/README.md
index d947e03a2484..64b2b038df20 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/README.md
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/README.md
@@ -1,6 +1,6 @@
# OpenAPI generated API stub
-[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface)
+[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface)
## Overview
@@ -14,8 +14,8 @@ To use auto-generated interfaces you have to create your own configuration which
@Configuration
public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator {
- public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance
- super(myWebClient);
+ public MyConfiguration(WebClient client) {
+ super(client);
}
}
```
\ No newline at end of file
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/pom.xml b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/pom.xml
index 78b746239fe3..c76e0e85dde0 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/pom.xml
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/pom.xml
@@ -12,7 +12,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.1.3
+ 3.3.13
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
index f9e6dca33a9a..f95998147006 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
@@ -19,45 +19,45 @@
public abstract class HttpInterfacesAbstractConfigurator {
- private final WebClient webClient;
+ private final WebClient client;
- public HttpInterfacesAbstractConfigurator(final WebClient webClient) {
- this.webClient = webClient;
+ public HttpInterfacesAbstractConfigurator(final WebClient client) {
+ this.client = client;
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake")
AnotherFakeApi anotherFakeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(AnotherFakeApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake")
FakeApi fakeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(FakeApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123")
FakeClassnameTags123Api fakeClassnameTags123HttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(FakeClassnameTags123Api.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet")
PetApi petHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(PetApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store")
StoreApi storeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(StoreApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user")
UserApi userHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(UserApi.class);
}
diff --git a/samples/client/petstore/spring-http-interface-reactive/README.md b/samples/client/petstore/spring-http-interface-reactive/README.md
index d947e03a2484..64b2b038df20 100644
--- a/samples/client/petstore/spring-http-interface-reactive/README.md
+++ b/samples/client/petstore/spring-http-interface-reactive/README.md
@@ -1,6 +1,6 @@
# OpenAPI generated API stub
-[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface)
+[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface)
## Overview
@@ -14,8 +14,8 @@ To use auto-generated interfaces you have to create your own configuration which
@Configuration
public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator {
- public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance
- super(myWebClient);
+ public MyConfiguration(WebClient client) {
+ super(client);
}
}
```
\ No newline at end of file
diff --git a/samples/client/petstore/spring-http-interface-reactive/pom.xml b/samples/client/petstore/spring-http-interface-reactive/pom.xml
index dc3e573f691a..d1730827004b 100644
--- a/samples/client/petstore/spring-http-interface-reactive/pom.xml
+++ b/samples/client/petstore/spring-http-interface-reactive/pom.xml
@@ -12,7 +12,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.1.3
+ 3.3.13
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
index f9e6dca33a9a..f95998147006 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
@@ -19,45 +19,45 @@
public abstract class HttpInterfacesAbstractConfigurator {
- private final WebClient webClient;
+ private final WebClient client;
- public HttpInterfacesAbstractConfigurator(final WebClient webClient) {
- this.webClient = webClient;
+ public HttpInterfacesAbstractConfigurator(final WebClient client) {
+ this.client = client;
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake")
AnotherFakeApi anotherFakeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(AnotherFakeApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake")
FakeApi fakeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(FakeApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123")
FakeClassnameTags123Api fakeClassnameTags123HttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(FakeClassnameTags123Api.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet")
PetApi petHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(PetApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store")
StoreApi storeHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(StoreApi.class);
}
@Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user")
UserApi userHttpProxy() {
- HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
+ HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
return factory.createClient(UserApi.class);
}
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator-ignore b/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator-ignore
new file mode 100644
index 000000000000..7484ee590a38
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator/FILES
new file mode 100644
index 000000000000..69906eac967c
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator/FILES
@@ -0,0 +1,59 @@
+README.md
+pom.xml
+src/main/java/org/openapitools/api/AnotherFakeApi.java
+src/main/java/org/openapitools/api/FakeApi.java
+src/main/java/org/openapitools/api/FakeClassnameTags123Api.java
+src/main/java/org/openapitools/api/PetApi.java
+src/main/java/org/openapitools/api/StoreApi.java
+src/main/java/org/openapitools/api/UserApi.java
+src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java
+src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java
+src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java
+src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java
+src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
+src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java
+src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java
+src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java
+src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java
+src/main/java/org/openapitools/model/AnimalDto.java
+src/main/java/org/openapitools/model/ApiResponseDto.java
+src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java
+src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java
+src/main/java/org/openapitools/model/ArrayTestDto.java
+src/main/java/org/openapitools/model/BigCatDto.java
+src/main/java/org/openapitools/model/CapitalizationDto.java
+src/main/java/org/openapitools/model/CatDto.java
+src/main/java/org/openapitools/model/CategoryDto.java
+src/main/java/org/openapitools/model/ChildWithNullableDto.java
+src/main/java/org/openapitools/model/ClassModelDto.java
+src/main/java/org/openapitools/model/ClientDto.java
+src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
+src/main/java/org/openapitools/model/DogDto.java
+src/main/java/org/openapitools/model/EnumArraysDto.java
+src/main/java/org/openapitools/model/EnumClassDto.java
+src/main/java/org/openapitools/model/EnumTestDto.java
+src/main/java/org/openapitools/model/FileDto.java
+src/main/java/org/openapitools/model/FileSchemaTestClassDto.java
+src/main/java/org/openapitools/model/FormatTestDto.java
+src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java
+src/main/java/org/openapitools/model/ListDto.java
+src/main/java/org/openapitools/model/MapTestDto.java
+src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java
+src/main/java/org/openapitools/model/Model200ResponseDto.java
+src/main/java/org/openapitools/model/NameDto.java
+src/main/java/org/openapitools/model/NullableMapPropertyDto.java
+src/main/java/org/openapitools/model/NumberOnlyDto.java
+src/main/java/org/openapitools/model/OrderDto.java
+src/main/java/org/openapitools/model/OuterCompositeDto.java
+src/main/java/org/openapitools/model/OuterEnumDto.java
+src/main/java/org/openapitools/model/ParentWithNullableDto.java
+src/main/java/org/openapitools/model/PetDto.java
+src/main/java/org/openapitools/model/ReadOnlyFirstDto.java
+src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java
+src/main/java/org/openapitools/model/ReturnDto.java
+src/main/java/org/openapitools/model/SpecialModelNameDto.java
+src/main/java/org/openapitools/model/TagDto.java
+src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
+src/main/java/org/openapitools/model/TypeHolderExampleDto.java
+src/main/java/org/openapitools/model/UserDto.java
+src/main/java/org/openapitools/model/XmlItemDto.java
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator/VERSION
new file mode 100644
index 000000000000..193a12d6e891
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.20.0-SNAPSHOT
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/README.md b/samples/client/petstore/spring-http-interface-springboot-4/README.md
new file mode 100644
index 000000000000..3f489eac9b72
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/README.md
@@ -0,0 +1,21 @@
+# OpenAPI generated API stub
+
+[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface)
+
+
+## Overview
+This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
+By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
+This is an example of building API stub interfaces in Java using the Spring framework.
+
+The stubs generated can be used in your existing Spring application for HTTP integration with other REST services
+To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `RestClient` instance via constructor
+```java
+@Configuration
+public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator {
+
+ public MyConfiguration(RestClient client) {
+ super(client);
+ }
+}
+```
\ No newline at end of file
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/pom.xml b/samples/client/petstore/spring-http-interface-springboot-4/pom.xml
new file mode 100644
index 000000000000..a93c0ff47b6b
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/pom.xml
@@ -0,0 +1,67 @@
+
+ 4.0.0
+ org.openapitools
+ spring-http-interface
+ jar
+ spring-http-interface
+ 1.0.0-SNAPSHOT
+
+ 17
+ UTF-8
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 4.0.1
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+ ${java.version}
+ ${java.version}
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-restclient
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+ jakarta.validation
+ jakarta.validation-api
+
+
+ org.springframework.boot
+ spring-boot-starter-restclient-test
+ test
+
+
+
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/AnotherFakeApi.java
new file mode 100644
index 000000000000..01d1324ff23b
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -0,0 +1,40 @@
+/*
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import org.openapitools.model.ClientDto;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.service.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import jakarta.annotation.Generated;
+
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT")
+public interface AnotherFakeApi {
+
+ /**
+ * PATCH /another-fake/dummy : To test special tags
+ * To test special tags and operation ID starting with number
+ *
+ * @param clientDto client model (required)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "PATCH",
+ value = "/another-fake/dummy",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity call123testSpecialTags(
+ @RequestBody ClientDto clientDto
+ );
+
+}
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java
new file mode 100644
index 000000000000..fc8aa14fdf11
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java
@@ -0,0 +1,378 @@
+/*
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import java.math.BigDecimal;
+import org.openapitools.model.ChildWithNullableDto;
+import org.openapitools.model.ClientDto;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.model.FileSchemaTestClassDto;
+import java.time.LocalDate;
+import java.util.Map;
+import org.springframework.lang.Nullable;
+import java.time.OffsetDateTime;
+import org.openapitools.model.OuterCompositeDto;
+import org.openapitools.model.UserDto;
+import org.openapitools.model.XmlItemDto;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.service.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import jakarta.annotation.Generated;
+
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT")
+public interface FakeApi {
+
+ /**
+ * POST /fake/create_xml_item : creates an XmlItem
+ * this route creates an XmlItem
+ *
+ * @param xmlItemDto XmlItem Body (required)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake/create_xml_item",
+ accept = { "application/json" },
+ contentType = "application/xml"
+ )
+ ResponseEntity createXmlItem(
+ @RequestBody XmlItemDto xmlItemDto
+ );
+
+
+ /**
+ * POST /fake/outer/boolean
+ * Test serialization of outer boolean types
+ *
+ * @param body Input boolean as post body (optional)
+ * @return Output boolean (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake/outer/boolean",
+ accept = { "*/*" },
+ contentType = "application/json"
+ )
+ ResponseEntity fakeOuterBooleanSerialize(
+ @RequestBody(required = false) @Nullable Boolean body
+ );
+
+
+ /**
+ * POST /fake/outer/composite
+ * Test serialization of object with outer number type
+ *
+ * @param outerCompositeDto Input composite as post body (optional)
+ * @return Output composite (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake/outer/composite",
+ accept = { "*/*" },
+ contentType = "application/json"
+ )
+ ResponseEntity fakeOuterCompositeSerialize(
+ @RequestBody(required = false) @Nullable OuterCompositeDto outerCompositeDto
+ );
+
+
+ /**
+ * POST /fake/outer/number
+ * Test serialization of outer number types
+ *
+ * @param body Input number as post body (optional)
+ * @return Output number (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake/outer/number",
+ accept = { "*/*" },
+ contentType = "application/json"
+ )
+ ResponseEntity fakeOuterNumberSerialize(
+ @RequestBody(required = false) @Nullable BigDecimal body
+ );
+
+
+ /**
+ * POST /fake/outer/string
+ * Test serialization of outer string types
+ *
+ * @param body Input string as post body (optional)
+ * @return Output string (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake/outer/string",
+ accept = { "*/*" },
+ contentType = "application/json"
+ )
+ ResponseEntity fakeOuterStringSerialize(
+ @RequestBody(required = false) @Nullable String body
+ );
+
+
+ /**
+ * PUT /fake/body-with-file-schema
+ * For this test, the body for this request much reference a schema named `File`.
+ *
+ * @param fileSchemaTestClassDto (required)
+ * @return Success (status code 200)
+ */
+ @HttpExchange(
+ method = "PUT",
+ value = "/fake/body-with-file-schema",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity testBodyWithFileSchema(
+ @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto
+ );
+
+
+ /**
+ * PUT /fake/body-with-query-params
+ *
+ * @param query (required)
+ * @param userDto (required)
+ * @return Success (status code 200)
+ */
+ @HttpExchange(
+ method = "PUT",
+ value = "/fake/body-with-query-params",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity testBodyWithQueryParams(
+ @RequestParam(value = "query", required = true) String query,
+ @RequestBody UserDto userDto
+ );
+
+
+ /**
+ * PATCH /fake : To test \"client\" model
+ * To test \"client\" model
+ *
+ * @param clientDto client model (required)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "PATCH",
+ value = "/fake",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity testClientModel(
+ @RequestBody ClientDto clientDto
+ );
+
+
+ /**
+ * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake",
+ accept = { "application/json" },
+ contentType = "application/x-www-form-urlencoded"
+ )
+ ResponseEntity testEndpointParameters(
+ @RequestParam(value = "number", required = true) BigDecimal number,
+ @RequestParam(value = "double", required = true) Double _double,
+ @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,
+ @RequestParam(value = "byte", required = true) byte[] _byte,
+ @RequestParam(value = "integer", required = false) Integer integer,
+ @RequestParam(value = "int32", required = false) Integer int32,
+ @RequestParam(value = "int64", required = false) Long int64,
+ @RequestParam(value = "float", required = false) Float _float,
+ @RequestParam(value = "string", required = false) String string,
+ @RequestPart(value = "binary", required = false) MultipartFile binary,
+ @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
+ @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
+ @RequestParam(value = "password", required = false) String password,
+ @RequestParam(value = "callback", required = false) String paramCallback
+ );
+
+
+ /**
+ * GET /fake : To test enum parameters
+ * To test enum parameters
+ *
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional)
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @return Invalid request (status code 400)
+ * or Not found (status code 404)
+ */
+ @HttpExchange(
+ method = "GET",
+ value = "/fake",
+ accept = { "application/json" },
+ contentType = "application/x-www-form-urlencoded"
+ )
+ ResponseEntity testEnumParameters(
+ @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray,
+ @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
+ @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray,
+ @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
+ @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger,
+ @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble,
+ @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,
+ @RequestParam(value = "enum_form_string", required = false) String enumFormString
+ );
+
+
+ /**
+ * DELETE /fake : Fake endpoint to test group parameters (optional)
+ * Fake endpoint to test group parameters (optional)
+ *
+ * @param requiredStringGroup Required String in group parameters (required)
+ * @param requiredBooleanGroup Required Boolean in group parameters (required)
+ * @param requiredInt64Group Required Integer in group parameters (required)
+ * @param stringGroup String in group parameters (optional)
+ * @param booleanGroup Boolean in group parameters (optional)
+ * @param int64Group Integer in group parameters (optional)
+ * @return Something wrong (status code 400)
+ */
+ @HttpExchange(
+ method = "DELETE",
+ value = "/fake",
+ accept = { "application/json" }
+ )
+ ResponseEntity testGroupParameters(
+ @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
+ @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
+ @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
+ @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup,
+ @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup,
+ @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group
+ );
+
+
+ /**
+ * POST /fake/inline-additionalProperties : test inline additionalProperties
+ *
+ *
+ * @param requestBody request body (required)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake/inline-additionalProperties",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity testInlineAdditionalProperties(
+ @RequestBody Map requestBody
+ );
+
+
+ /**
+ * GET /fake/jsonFormData : test json serialization of form data
+ *
+ *
+ * @param param field1 (required)
+ * @param param2 field2 (required)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "GET",
+ value = "/fake/jsonFormData",
+ accept = { "application/json" },
+ contentType = "application/x-www-form-urlencoded"
+ )
+ ResponseEntity testJsonFormData(
+ @RequestParam(value = "param", required = true) String param,
+ @RequestParam(value = "param2", required = true) String param2
+ );
+
+
+ /**
+ * POST /fake/nullable : test nullable parent property
+ *
+ *
+ * @param childWithNullableDto request body (required)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake/nullable",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity testNullable(
+ @RequestBody ChildWithNullableDto childWithNullableDto
+ );
+
+
+ /**
+ * PUT /fake/test-query-parameters
+ * To test the collection format in query parameters
+ *
+ * @param pipe (required)
+ * @param http (required)
+ * @param url (required)
+ * @param context (required)
+ * @return Success (status code 200)
+ */
+ @HttpExchange(
+ method = "PUT",
+ value = "/fake/test-query-parameters",
+ accept = { "application/json" }
+ )
+ ResponseEntity testQueryParameterCollectionFormat(
+ @RequestParam(value = "pipe", required = true) List pipe,
+ @RequestParam(value = "http", required = true) List http,
+ @RequestParam(value = "url", required = true) List url,
+ @RequestParam(value = "context", required = true) List context
+ );
+
+
+ /**
+ * GET /fake/response-with-example
+ * This endpoint defines an example value for its response schema.
+ *
+ * @return Success (status code 200)
+ */
+ @HttpExchange(
+ method = "GET",
+ value = "/fake/response-with-example",
+ accept = { "application/json" }
+ )
+ ResponseEntity testWithResultExample(
+
+ );
+
+}
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java
new file mode 100644
index 000000000000..733c3da6a214
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java
@@ -0,0 +1,40 @@
+/*
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import org.openapitools.model.ClientDto;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.service.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import jakarta.annotation.Generated;
+
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT")
+public interface FakeClassnameTags123Api {
+
+ /**
+ * PATCH /fake_classname_test : To test class name in snake case
+ * To test class name in snake case
+ *
+ * @param clientDto client model (required)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "PATCH",
+ value = "/fake_classname_test",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity testClassname(
+ @RequestBody ClientDto clientDto
+ );
+
+}
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java
new file mode 100644
index 000000000000..1e123cf725a0
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java
@@ -0,0 +1,225 @@
+/*
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import org.openapitools.model.ApiResponseDto;
+import org.springframework.lang.Nullable;
+import org.openapitools.model.PetDto;
+import org.openapitools.model.ResponseObjectWithDifferentFieldNamesDto;
+import java.util.Set;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.service.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import jakarta.annotation.Generated;
+
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT")
+public interface PetApi {
+
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ *
+ * @param petDto Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid input (status code 405)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/pet",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity addPet(
+ @RequestBody PetDto petDto
+ );
+
+
+ /**
+ * DELETE /pet/{petId} : Deletes a pet
+ *
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return successful operation (status code 200)
+ * or Invalid pet value (status code 400)
+ */
+ @HttpExchange(
+ method = "DELETE",
+ value = "/pet/{petId}",
+ accept = { "application/json" }
+ )
+ ResponseEntity deletePet(
+ @PathVariable("petId") Long petId,
+ @RequestHeader(value = "api_key", required = false) @Nullable String apiKey
+ );
+
+
+ /**
+ * GET /pet/findByStatus : Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @param status Status values that need to be considered for filter (required)
+ * @return successful operation (status code 200)
+ * or Invalid status value (status code 400)
+ */
+ @HttpExchange(
+ method = "GET",
+ value = "/pet/findByStatus",
+ accept = { "application/json", "application/xml" }
+ )
+ ResponseEntity> findPetsByStatus(
+ @RequestParam(value = "status", required = true) List status
+ );
+
+
+ /**
+ * GET /pet/findByTags : Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param tags Tags to filter by (required)
+ * @return successful operation (status code 200)
+ * or Invalid tag value (status code 400)
+ * @deprecated
+ */
+ @Deprecated
+ @HttpExchange(
+ method = "GET",
+ value = "/pet/findByTags",
+ accept = { "application/json", "application/xml" }
+ )
+ ResponseEntity> findPetsByTags(
+ @RequestParam(value = "tags", required = true) Set tags
+ );
+
+
+ /**
+ * GET /pet/{petId} : Find pet by ID
+ * Returns a single pet
+ *
+ * @param petId ID of pet to return (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ */
+ @HttpExchange(
+ method = "GET",
+ value = "/pet/{petId}",
+ accept = { "application/json", "application/xml" }
+ )
+ ResponseEntity getPetById(
+ @PathVariable("petId") Long petId
+ );
+
+
+ /**
+ * GET /fake/{petId}/response-object-different-names
+ *
+ * @param petId ID of pet to update (required)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "GET",
+ value = "/fake/{petId}/response-object-different-names",
+ accept = { "application/json" }
+ )
+ ResponseEntity responseObjectDifferentNames(
+ @PathVariable("petId") Long petId
+ );
+
+
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ *
+ * @param petDto Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * or Validation exception (status code 405)
+ */
+ @HttpExchange(
+ method = "PUT",
+ value = "/pet",
+ accept = { "application/json" },
+ contentType = "application/json"
+ )
+ ResponseEntity updatePet(
+ @RequestBody PetDto petDto
+ );
+
+
+ /**
+ * POST /pet/{petId} : Updates a pet in the store with form data
+ *
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return Invalid input (status code 405)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/pet/{petId}",
+ accept = { "application/json" },
+ contentType = "application/x-www-form-urlencoded"
+ )
+ ResponseEntity updatePetWithForm(
+ @PathVariable("petId") Long petId,
+ @RequestParam(value = "name", required = false) String name,
+ @RequestParam(value = "status", required = false) String status
+ );
+
+
+ /**
+ * POST /pet/{petId}/uploadImage : uploads an image
+ *
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/pet/{petId}/uploadImage",
+ accept = { "application/json" },
+ contentType = "multipart/form-data"
+ )
+ ResponseEntity uploadFile(
+ @PathVariable("petId") Long petId,
+ @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
+ @RequestPart(value = "file", required = false) MultipartFile file
+ );
+
+
+ /**
+ * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required)
+ *
+ *
+ * @param petId ID of pet to update (required)
+ * @param requiredFile file to upload (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "POST",
+ value = "/fake/{petId}/uploadImageWithRequiredFile",
+ accept = { "application/json" },
+ contentType = "multipart/form-data"
+ )
+ ResponseEntity uploadFileWithRequiredFile(
+ @PathVariable("petId") Long petId,
+ @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,
+ @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata
+ );
+
+}
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/StoreApi.java
new file mode 100644
index 000000000000..6bcb815d5b5a
--- /dev/null
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/StoreApi.java
@@ -0,0 +1,95 @@
+/*
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import java.util.Map;
+import org.openapitools.model.OrderDto;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.service.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import jakarta.annotation.Generated;
+
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT")
+public interface StoreApi {
+
+ /**
+ * DELETE /store/order/{order_id} : Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
+ @HttpExchange(
+ method = "DELETE",
+ value = "/store/order/{order_id}",
+ accept = { "application/json" }
+ )
+ ResponseEntity deleteOrder(
+ @PathVariable("order_id") String orderId
+ );
+
+
+ /**
+ * GET /store/inventory : Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
+ * @return successful operation (status code 200)
+ */
+ @HttpExchange(
+ method = "GET",
+ value = "/store/inventory",
+ accept = { "application/json" }
+ )
+ ResponseEntity