diff --git a/bin/configs/spring-boot-defaultInterface-unhandledException.yaml b/bin/configs/spring-boot-defaultInterface-unhandledException.yaml
new file mode 100644
index 00000000000..3d492c12f76
--- /dev/null
+++ b/bin/configs/spring-boot-defaultInterface-unhandledException.yaml
@@ -0,0 +1,11 @@
+generatorName: spring
+outputDir: samples/server/petstore/spring-boot-defaultInterface-unhandledException
+inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+additionalProperties:
+ artifactId: spring-boot-defaultInterface-unhandledException
+ hideGenerationTimestamp: true
+ java8: true
+ interfaceOnly: true
+ skipDefaultInterface: true
+ unhandledException: true
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator-ignore b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator-ignore
new file mode 100644
index 00000000000..7484ee590a3
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.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/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES
new file mode 100644
index 00000000000..8bf287f9b1f
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES
@@ -0,0 +1,57 @@
+README.md
+pom.xml
+src/main/java/org/openapitools/api/AnotherFakeApi.java
+src/main/java/org/openapitools/api/ApiUtil.java
+src/main/java/org/openapitools/api/FakeApi.java
+src/main/java/org/openapitools/api/FakeClassnameTestApi.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/model/AdditionalPropertiesAnyType.java
+src/main/java/org/openapitools/model/AdditionalPropertiesArray.java
+src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java
+src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
+src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java
+src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java
+src/main/java/org/openapitools/model/AdditionalPropertiesObject.java
+src/main/java/org/openapitools/model/AdditionalPropertiesString.java
+src/main/java/org/openapitools/model/Animal.java
+src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java
+src/main/java/org/openapitools/model/ArrayOfNumberOnly.java
+src/main/java/org/openapitools/model/ArrayTest.java
+src/main/java/org/openapitools/model/BigCat.java
+src/main/java/org/openapitools/model/BigCatAllOf.java
+src/main/java/org/openapitools/model/Capitalization.java
+src/main/java/org/openapitools/model/Cat.java
+src/main/java/org/openapitools/model/CatAllOf.java
+src/main/java/org/openapitools/model/Category.java
+src/main/java/org/openapitools/model/ClassModel.java
+src/main/java/org/openapitools/model/Client.java
+src/main/java/org/openapitools/model/Dog.java
+src/main/java/org/openapitools/model/DogAllOf.java
+src/main/java/org/openapitools/model/EnumArrays.java
+src/main/java/org/openapitools/model/EnumClass.java
+src/main/java/org/openapitools/model/EnumTest.java
+src/main/java/org/openapitools/model/File.java
+src/main/java/org/openapitools/model/FileSchemaTestClass.java
+src/main/java/org/openapitools/model/FormatTest.java
+src/main/java/org/openapitools/model/HasOnlyReadOnly.java
+src/main/java/org/openapitools/model/MapTest.java
+src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java
+src/main/java/org/openapitools/model/Model200Response.java
+src/main/java/org/openapitools/model/ModelApiResponse.java
+src/main/java/org/openapitools/model/ModelList.java
+src/main/java/org/openapitools/model/ModelReturn.java
+src/main/java/org/openapitools/model/Name.java
+src/main/java/org/openapitools/model/NumberOnly.java
+src/main/java/org/openapitools/model/Order.java
+src/main/java/org/openapitools/model/OuterComposite.java
+src/main/java/org/openapitools/model/OuterEnum.java
+src/main/java/org/openapitools/model/Pet.java
+src/main/java/org/openapitools/model/ReadOnlyFirst.java
+src/main/java/org/openapitools/model/SpecialModelName.java
+src/main/java/org/openapitools/model/Tag.java
+src/main/java/org/openapitools/model/TypeHolderDefault.java
+src/main/java/org/openapitools/model/TypeHolderExample.java
+src/main/java/org/openapitools/model/User.java
+src/main/java/org/openapitools/model/XmlItem.java
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/VERSION b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/VERSION
new file mode 100644
index 00000000000..5f68295fc19
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/VERSION
@@ -0,0 +1 @@
+6.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/README.md b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/README.md
new file mode 100644
index 00000000000..d43a1de307d
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/README.md
@@ -0,0 +1,27 @@
+
+# OpenAPI generated API stub
+
+Spring Framework stub
+
+
+## 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-MVC or Spring-Boot application to create controller endpoints
+by adding ```@Controller``` classes that implement the interface. Eg:
+```java
+@Controller
+public class PetController implements PetApi {
+// implement all PetApi methods
+}
+```
+
+You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
+```java
+@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
+public interface PetClient extends PetApi {
+
+}
+```
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/pom.xml b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/pom.xml
new file mode 100644
index 00000000000..05f2488b9e9
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/pom.xml
@@ -0,0 +1,72 @@
+
+ 4.0.0
+ org.openapitools
+ spring-boot-defaultInterface-unhandledException
+ jar
+ spring-boot-defaultInterface-unhandledException
+ 1.0.0
+
+ 1.8
+ ${java.version}
+ ${java.version}
+ 1.6.4
+ 4.4.1-1
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.6.3
+
+
+ src/main/java
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.data
+ spring-data-commons
+
+
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc.version}
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-yaml
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+ org.openapitools
+ jackson-databind-nullable
+ 0.2.2
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java
new file mode 100644
index 00000000000..cd1077275bd
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -0,0 +1,64 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import org.openapitools.model.Client;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
+@Validated
+@Tag(name = "another-fake", description = "the another-fake API")
+public interface AnotherFakeApi {
+
+ /**
+ * PATCH /another-fake/dummy : To test special tags
+ * To test special tags and operation ID starting with number
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
+ @Operation(
+ operationId = "call123testSpecialTags",
+ summary = "To test special tags",
+ tags = { "$another-fake?" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))
+ })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.PATCH,
+ value = "/another-fake/dummy",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity call123testSpecialTags(
+ @Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
+ ) throws Exception;
+
+}
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/ApiUtil.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/ApiUtil.java
new file mode 100644
index 00000000000..1245b1dd0cc
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/ApiUtil.java
@@ -0,0 +1,19 @@
+package org.openapitools.api;
+
+import org.springframework.web.context.request.NativeWebRequest;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class ApiUtil {
+ public static void setExampleResponse(NativeWebRequest req, String contentType, String example) {
+ try {
+ HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class);
+ res.setCharacterEncoding("UTF-8");
+ res.addHeader("Content-Type", contentType);
+ res.getWriter().print(example);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java
new file mode 100644
index 00000000000..ade63d344bd
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java
@@ -0,0 +1,498 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import java.math.BigDecimal;
+import org.openapitools.model.Client;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.model.FileSchemaTestClass;
+import java.time.LocalDate;
+import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
+import java.time.OffsetDateTime;
+import org.openapitools.model.OuterComposite;
+import org.openapitools.model.User;
+import org.openapitools.model.XmlItem;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
+@Validated
+@Tag(name = "fake", description = "the fake API")
+public interface FakeApi {
+
+ /**
+ * POST /fake/create_xml_item : creates an XmlItem
+ * this route creates an XmlItem
+ *
+ * @param xmlItem XmlItem Body (required)
+ * @return successful operation (status code 200)
+ */
+ @Operation(
+ operationId = "createXmlItem",
+ summary = "creates an XmlItem",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/fake/create_xml_item",
+ consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" }
+ )
+ ResponseEntity createXmlItem(
+ @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem
+ ) throws Exception;
+
+
+ /**
+ * POST /fake/outer/boolean
+ * Test serialization of outer boolean types
+ *
+ * @param body Input boolean as post body (optional)
+ * @return Output boolean (status code 200)
+ */
+ @Operation(
+ operationId = "fakeOuterBooleanSerialize",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Output boolean", content = {
+ @Content(mediaType = "*/*", schema = @Schema(implementation = Boolean.class))
+ })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/fake/outer/boolean",
+ produces = { "*/*" }
+ )
+ ResponseEntity fakeOuterBooleanSerialize(
+ @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body
+ ) throws Exception;
+
+
+ /**
+ * POST /fake/outer/composite
+ * Test serialization of object with outer number type
+ *
+ * @param body Input composite as post body (optional)
+ * @return Output composite (status code 200)
+ */
+ @Operation(
+ operationId = "fakeOuterCompositeSerialize",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Output composite", content = {
+ @Content(mediaType = "*/*", schema = @Schema(implementation = OuterComposite.class))
+ })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/fake/outer/composite",
+ produces = { "*/*" }
+ )
+ ResponseEntity fakeOuterCompositeSerialize(
+ @Parameter(name = "body", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body
+ ) throws Exception;
+
+
+ /**
+ * POST /fake/outer/number
+ * Test serialization of outer number types
+ *
+ * @param body Input number as post body (optional)
+ * @return Output number (status code 200)
+ */
+ @Operation(
+ operationId = "fakeOuterNumberSerialize",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Output number", content = {
+ @Content(mediaType = "*/*", schema = @Schema(implementation = BigDecimal.class))
+ })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/fake/outer/number",
+ produces = { "*/*" }
+ )
+ ResponseEntity fakeOuterNumberSerialize(
+ @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body
+ ) throws Exception;
+
+
+ /**
+ * POST /fake/outer/string
+ * Test serialization of outer string types
+ *
+ * @param body Input string as post body (optional)
+ * @return Output string (status code 200)
+ */
+ @Operation(
+ operationId = "fakeOuterStringSerialize",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Output string", content = {
+ @Content(mediaType = "*/*", schema = @Schema(implementation = String.class))
+ })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/fake/outer/string",
+ produces = { "*/*" }
+ )
+ ResponseEntity fakeOuterStringSerialize(
+ @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body
+ ) throws Exception;
+
+
+ /**
+ * PUT /fake/body-with-file-schema
+ * For this test, the body for this request much reference a schema named `File`.
+ *
+ * @param body (required)
+ * @return Success (status code 200)
+ */
+ @Operation(
+ operationId = "testBodyWithFileSchema",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Success")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.PUT,
+ value = "/fake/body-with-file-schema",
+ consumes = { "application/json" }
+ )
+ ResponseEntity testBodyWithFileSchema(
+ @Parameter(name = "body", description = "", required = true) @Valid @RequestBody FileSchemaTestClass body
+ ) throws Exception;
+
+
+ /**
+ * PUT /fake/body-with-query-params
+ *
+ * @param query (required)
+ * @param body (required)
+ * @return Success (status code 200)
+ */
+ @Operation(
+ operationId = "testBodyWithQueryParams",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Success")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.PUT,
+ value = "/fake/body-with-query-params",
+ consumes = { "application/json" }
+ )
+ ResponseEntity testBodyWithQueryParams(
+ @NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
+ @Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
+ ) throws Exception;
+
+
+ /**
+ * PATCH /fake : To test \"client\" model
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
+ @Operation(
+ operationId = "testClientModel",
+ summary = "To test \"client\" model",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))
+ })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.PATCH,
+ value = "/fake",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity testClientModel(
+ @Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
+ ) throws Exception;
+
+
+ /**
+ * 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)
+ */
+ @Operation(
+ operationId = "testEndpointParameters",
+ summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "400", description = "Invalid username supplied"),
+ @ApiResponse(responseCode = "404", description = "User not found")
+ },
+ security = {
+ @SecurityRequirement(name = "http_basic_test")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/fake",
+ consumes = { "application/x-www-form-urlencoded" }
+ )
+ ResponseEntity testEndpointParameters(
+ @Parameter(name = "number", description = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,
+ @Parameter(name = "double", description = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,
+ @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,
+ @Parameter(name = "byte", description = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,
+ @Parameter(name = "integer", description = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,
+ @Parameter(name = "int32", description = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,
+ @Parameter(name = "int64", description = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,
+ @Parameter(name = "float", description = "None") @Valid @RequestPart(value = "float", required = false) Float _float,
+ @Parameter(name = "string", description = "None") @Valid @RequestPart(value = "string", required = false) String string,
+ @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary,
+ @Parameter(name = "date", description = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
+ @Parameter(name = "dateTime", description = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
+ @Parameter(name = "password", description = "None") @Valid @RequestPart(value = "password", required = false) String password,
+ @Parameter(name = "callback", description = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback
+ ) throws Exception;
+
+
+ /**
+ * 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)
+ */
+ @Operation(
+ operationId = "testEnumParameters",
+ summary = "To test enum parameters",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "400", description = "Invalid request"),
+ @ApiResponse(responseCode = "404", description = "Not found")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/fake",
+ consumes = { "application/x-www-form-urlencoded" }
+ )
+ ResponseEntity testEnumParameters(
+ @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,
+ @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
+ @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,
+ @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
+ @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
+ @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
+ @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,
+ @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString
+ ) throws Exception;
+
+
+ /**
+ * 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 Someting wrong (status code 400)
+ */
+ @Operation(
+ operationId = "testGroupParameters",
+ summary = "Fake endpoint to test group parameters (optional)",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "400", description = "Someting wrong")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.DELETE,
+ value = "/fake"
+ )
+ ResponseEntity testGroupParameters(
+ @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
+ @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
+ @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
+ @Parameter(name = "string_group", description = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
+ @Parameter(name = "boolean_group", description = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
+ @Parameter(name = "int64_group", description = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
+ ) throws Exception;
+
+
+ /**
+ * POST /fake/inline-additionalProperties : test inline additionalProperties
+ *
+ * @param param request body (required)
+ * @return successful operation (status code 200)
+ */
+ @Operation(
+ operationId = "testInlineAdditionalProperties",
+ summary = "test inline additionalProperties",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/fake/inline-additionalProperties",
+ consumes = { "application/json" }
+ )
+ ResponseEntity testInlineAdditionalProperties(
+ @Parameter(name = "param", description = "request body", required = true) @Valid @RequestBody Map param
+ ) throws Exception;
+
+
+ /**
+ * GET /fake/jsonFormData : test json serialization of form data
+ *
+ * @param param field1 (required)
+ * @param param2 field2 (required)
+ * @return successful operation (status code 200)
+ */
+ @Operation(
+ operationId = "testJsonFormData",
+ summary = "test json serialization of form data",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/fake/jsonFormData",
+ consumes = { "application/x-www-form-urlencoded" }
+ )
+ ResponseEntity testJsonFormData(
+ @Parameter(name = "param", description = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,
+ @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2
+ ) throws Exception;
+
+
+ /**
+ * PUT /fake/test-query-parameters
+ * To test the collection format in query parameters
+ *
+ * @param pipe (required)
+ * @param ioutil (required)
+ * @param http (required)
+ * @param url (required)
+ * @param context (required)
+ * @return Success (status code 200)
+ */
+ @Operation(
+ operationId = "testQueryParameterCollectionFormat",
+ tags = { "fake" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Success")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.PUT,
+ value = "/fake/test-query-parameters"
+ )
+ ResponseEntity testQueryParameterCollectionFormat(
+ @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,
+ @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,
+ @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,
+ @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,
+ @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context
+ ) throws Exception;
+
+
+ /**
+ * 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)
+ */
+ @Operation(
+ operationId = "uploadFileWithRequiredFile",
+ summary = "uploads an image (required)",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" }
+ )
+ ResponseEntity uploadFileWithRequiredFile(
+ @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
+ @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,
+ @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata
+ ) throws Exception;
+
+}
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
new file mode 100644
index 00000000000..df22180bde3
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -0,0 +1,67 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import org.openapitools.model.Client;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
+@Validated
+@Tag(name = "fake_classname_test", description = "the fake_classname_test API")
+public interface FakeClassnameTestApi {
+
+ /**
+ * PATCH /fake_classname_test : To test class name in snake case
+ * To test class name in snake case
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
+ @Operation(
+ operationId = "testClassname",
+ summary = "To test class name in snake case",
+ tags = { "fake_classname_tags 123#$%^" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "api_key_query")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.PATCH,
+ value = "/fake_classname_test",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity testClassname(
+ @Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
+ ) throws Exception;
+
+}
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java
new file mode 100644
index 00000000000..391f37fabd8
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java
@@ -0,0 +1,297 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import org.openapitools.model.ModelApiResponse;
+import org.openapitools.model.Pet;
+import java.util.Set;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
+@Validated
+@Tag(name = "pet", description = "the pet API")
+public interface PetApi {
+
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid input (status code 405)
+ */
+ @Operation(
+ operationId = "addPet",
+ summary = "Add a new pet to the store",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation"),
+ @ApiResponse(responseCode = "405", description = "Invalid input")
+ },
+ security = {
+ @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/pet",
+ consumes = { "application/json", "application/xml" }
+ )
+ ResponseEntity addPet(
+ @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
+ ) throws Exception;
+
+
+ /**
+ * 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)
+ */
+ @Operation(
+ operationId = "deletePet",
+ summary = "Deletes a pet",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation"),
+ @ApiResponse(responseCode = "400", description = "Invalid pet value")
+ },
+ security = {
+ @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.DELETE,
+ value = "/pet/{petId}"
+ )
+ ResponseEntity deletePet(
+ @Parameter(name = "petId", description = "Pet id to delete", required = true) @PathVariable("petId") Long petId,
+ @Parameter(name = "api_key", description = "") @RequestHeader(value = "api_key", required = false) String apiKey
+ ) throws Exception;
+
+
+ /**
+ * 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)
+ */
+ @Operation(
+ operationId = "findPetsByStatus",
+ summary = "Finds Pets by status",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)),
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Invalid status value")
+ },
+ security = {
+ @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/pet/findByStatus",
+ produces = { "application/xml", "application/json" }
+ )
+ ResponseEntity> findPetsByStatus(
+ @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status
+ ) throws Exception;
+
+
+ /**
+ * 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
+ */
+ @Operation(
+ operationId = "findPetsByTags",
+ summary = "Finds Pets by tags",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)),
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Invalid tag value")
+ },
+ security = {
+ @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/pet/findByTags",
+ produces = { "application/xml", "application/json" }
+ )
+ ResponseEntity> findPetsByTags(
+ @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags
+ ) throws Exception;
+
+
+ /**
+ * 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)
+ */
+ @Operation(
+ operationId = "getPetById",
+ summary = "Find pet by ID",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)),
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
+ @ApiResponse(responseCode = "404", description = "Pet not found")
+ },
+ security = {
+ @SecurityRequirement(name = "api_key")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/pet/{petId}",
+ produces = { "application/xml", "application/json" }
+ )
+ ResponseEntity getPetById(
+ @Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
+ ) throws Exception;
+
+
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ * @param body 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)
+ */
+ @Operation(
+ operationId = "updatePet",
+ summary = "Update an existing pet",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation"),
+ @ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
+ @ApiResponse(responseCode = "404", description = "Pet not found"),
+ @ApiResponse(responseCode = "405", description = "Validation exception")
+ },
+ security = {
+ @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.PUT,
+ value = "/pet",
+ consumes = { "application/json", "application/xml" }
+ )
+ ResponseEntity updatePet(
+ @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
+ ) throws Exception;
+
+
+ /**
+ * 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)
+ */
+ @Operation(
+ operationId = "updatePetWithForm",
+ summary = "Updates a pet in the store with form data",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "405", description = "Invalid input")
+ },
+ security = {
+ @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/pet/{petId}",
+ consumes = { "application/x-www-form-urlencoded" }
+ )
+ ResponseEntity updatePetWithForm(
+ @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
+ @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,
+ @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status
+ ) throws Exception;
+
+
+ /**
+ * 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)
+ */
+ @Operation(
+ operationId = "uploadFile",
+ summary = "uploads an image",
+ tags = { "pet" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/pet/{petId}/uploadImage",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" }
+ )
+ ResponseEntity uploadFile(
+ @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
+ @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,
+ @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
+ ) throws Exception;
+
+}
diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java
new file mode 100644
index 00000000000..0ff28ee8d7e
--- /dev/null
+++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java
@@ -0,0 +1,153 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package org.openapitools.api;
+
+import java.util.Map;
+import org.openapitools.model.Order;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
+@Validated
+@Tag(name = "store", description = "the store API")
+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)
+ */
+ @Operation(
+ operationId = "deleteOrder",
+ summary = "Delete purchase order by ID",
+ tags = { "store" },
+ responses = {
+ @ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
+ @ApiResponse(responseCode = "404", description = "Order not found")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.DELETE,
+ value = "/store/order/{order_id}"
+ )
+ ResponseEntity deleteOrder(
+ @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
+ ) throws Exception;
+
+
+ /**
+ * GET /store/inventory : Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
+ * @return successful operation (status code 200)
+ */
+ @Operation(
+ operationId = "getInventory",
+ summary = "Returns pet inventories by status",
+ tags = { "store" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "successful operation", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "api_key")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/store/inventory",
+ produces = { "application/json" }
+ )
+ ResponseEntity