diff --git a/.github/workflows/samples-spring-jdk17.yaml b/.github/workflows/samples-spring-jdk17.yaml index 1fe369ec5509..c418575347ff 100644 --- a/.github/workflows/samples-spring-jdk17.yaml +++ b/.github/workflows/samples-spring-jdk17.yaml @@ -5,12 +5,16 @@ on: paths: - samples/openapi3/client/petstore/spring-cloud-3-with-optional - samples/openapi3/server/petstore/springboot-3 + - samples/server/petstore/springboot-lombok-data + - samples/server/petstore/springboot-lombok-tostring + - samples/server/petstore/springboot-file-delegate-optional pull_request: paths: - samples/openapi3/client/petstore/spring-cloud-3-with-optional - samples/openapi3/server/petstore/springboot-3 - samples/server/petstore/springboot-lombok-data - samples/server/petstore/springboot-lombok-tostring + - samples/server/petstore/springboot-file-delegate-optional jobs: build: name: Build Java Spring (JDK17) @@ -25,6 +29,7 @@ jobs: - samples/openapi3/server/petstore/springboot-3 - samples/server/petstore/springboot-lombok-data - samples/server/petstore/springboot-lombok-tostring + - samples/server/petstore/springboot-file-delegate-optional steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 diff --git a/bin/configs/spring-boot-file-delegate-optional.yaml b/bin/configs/spring-boot-file-delegate-optional.yaml new file mode 100644 index 000000000000..68c15c540431 --- /dev/null +++ b/bin/configs/spring-boot-file-delegate-optional.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-file-delegate-optional +inputSpec: modules/openapi-generator/src/test/resources/3_0/issue18345.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + delegatePattern: true + useOptional: true + useSpringBoot3: true + artifactId: spring-boot-use-optional + hideGenerationTimestamp: "true" diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache index 5b10c93fa73c..20ed2e4ac0d3 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache @@ -66,7 +66,7 @@ public interface {{classname}}Delegate { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{>responseType}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}}, + {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{>responseType}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}{{#isFormParam}}MultipartFile{{/isFormParam}}{{^isFormParam}}{{>optionalDataType}}{{/isFormParam}}{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { {{>methodBody}} diff --git a/modules/openapi-generator/src/test/resources/3_0/issue18345.yaml b/modules/openapi-generator/src/test/resources/3_0/issue18345.yaml new file mode 100644 index 000000000000..d74ca5f3b0d6 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue18345.yaml @@ -0,0 +1,19 @@ +openapi: 3.0.3 +info: + title: Issue 18345 + description: '' + version: 1.0.0 +paths: + /dummy: + post: + description: '' + operationId: uploadFile + requestBody: + content: + application/octet-stream: + schema: + type: string + format: binary + responses: + '200': + description: successful operation diff --git a/samples/server/petstore/springboot-file-delegate-optional/.openapi-generator-ignore b/samples/server/petstore/springboot-file-delegate-optional/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/.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/springboot-file-delegate-optional/.openapi-generator/FILES b/samples/server/petstore/springboot-file-delegate-optional/.openapi-generator/FILES new file mode 100644 index 000000000000..a0c2e31c8865 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/.openapi-generator/FILES @@ -0,0 +1,12 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenApiGeneratorApplication.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/DummyApi.java +src/main/java/org/openapitools/api/DummyApiDelegate.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/configuration/SpringDocConfiguration.java +src/main/resources/application.properties +src/main/resources/openapi.yaml +src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java diff --git a/samples/server/petstore/springboot-file-delegate-optional/.openapi-generator/VERSION b/samples/server/petstore/springboot-file-delegate-optional/.openapi-generator/VERSION new file mode 100644 index 000000000000..7e7b8b9bc733 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.7.0-SNAPSHOT diff --git a/samples/server/petstore/springboot-file-delegate-optional/README.md b/samples/server/petstore/springboot-file-delegate-optional/README.md new file mode 100644 index 000000000000..5cd22b6081a2 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated server + +Spring Boot Server + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + + +The underlying library integrating OpenAPI to Spring Boot is [springdoc](https://springdoc.org). +Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes. +The specification is available to download using the following url: +http://localhost:8080/v3/api-docs/ + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:8080/swagger-ui.html + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-file-delegate-optional/pom.xml b/samples/server/petstore/springboot-file-delegate-optional/pom.xml new file mode 100644 index 000000000000..3afd4785fae9 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/pom.xml @@ -0,0 +1,97 @@ + + 4.0.0 + org.openapitools + spring-boot-use-optional + jar + spring-boot-use-optional + 1.0.0 + + 17 + ${java.version} + ${java.version} + UTF-8 + 2.2.0 + 5.3.1 + + + org.springframework.boot + spring-boot-starter-parent + 3.1.3 + + + + + + repository.spring.milestone + Spring Milestone Repository + https://repo.spring.io/milestone + + + + + spring-milestones + https://repo.spring.io/milestone + + + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + org.springdoc + springdoc-openapi-starter-webmvc-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.6 + + + + 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/springboot-file-delegate-optional/src/main/java/org/openapitools/OpenApiGeneratorApplication.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/OpenApiGeneratorApplication.java new file mode 100644 index 000000000000..97252a8a9402 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/OpenApiGeneratorApplication.java @@ -0,0 +1,30 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.FilterType; +import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator; + +@SpringBootApplication( + nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class +) +@ComponentScan( + basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}, + nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class +) +public class OpenApiGeneratorApplication { + + public static void main(String[] args) { + SpringApplication.run(OpenApiGeneratorApplication.class, args); + } + + @Bean(name = "org.openapitools.OpenApiGeneratorApplication.jsonNullableModule") + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return this; + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/ApiUtil.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..9bcd4f230ed3 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import jakarta.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/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApi.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApi.java new file mode 100644 index 000000000000..295b73c0f949 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApi.java @@ -0,0 +1,66 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.7.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import io.swagger.v3.oas.annotations.ExternalDocumentation; +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.ArraySchema; +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 io.swagger.v3.oas.annotations.enums.ParameterIn; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +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.7.0-SNAPSHOT") +@Validated +@Tag(name = "dummy", description = "the dummy API") +public interface DummyApi { + + default DummyApiDelegate getDelegate() { + return new DummyApiDelegate() {}; + } + + /** + * POST /dummy + * + * + * @param body (optional) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "uploadFile", + description = "", + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/dummy", + consumes = { "application/octet-stream" } + ) + + default ResponseEntity uploadFile( + @Parameter(name = "body", description = "") @Valid @RequestBody(required = false) Optional body + ) { + return getDelegate().uploadFile(body); + } + +} diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApiController.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApiController.java new file mode 100644 index 000000000000..673f6e628da1 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApiController.java @@ -0,0 +1,43 @@ +package org.openapitools.api; + + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; + +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.6.0-SNAPSHOT") +@Controller +@RequestMapping("${openapi.issue18345.base-path:}") +public class DummyApiController implements DummyApi { + + private final DummyApiDelegate delegate; + + public DummyApiController(@Autowired(required = false) DummyApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new DummyApiDelegate() {}); + } + + @Override + public DummyApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApiDelegate.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApiDelegate.java new file mode 100644 index 000000000000..78698954fba0 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApiDelegate.java @@ -0,0 +1,40 @@ +package org.openapitools.api; + +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +/** + * A delegate to be called by the {@link DummyApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.7.0-SNAPSHOT") +public interface DummyApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /dummy + * + * + * @param body (optional) + * @return successful operation (status code 200) + * @see DummyApi#uploadFile + */ + default ResponseEntity uploadFile(Optional body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/configuration/HomeController.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..9aa29284ab5f --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,20 @@ +package org.openapitools.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.GetMapping; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui.html"; + } + +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java new file mode 100644 index 000000000000..f710be637147 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java @@ -0,0 +1,27 @@ +package org.openapitools.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.Contact; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.security.SecurityScheme; + +@Configuration +public class SpringDocConfiguration { + + @Bean(name = "org.openapitools.configuration.SpringDocConfiguration.apiInfo") + OpenAPI apiInfo() { + return new OpenAPI() + .info( + new Info() + .title("Issue 18345") + .description("No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)") + .version("1.0.0") + ) + ; + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/resources/application.properties b/samples/server/petstore/springboot-file-delegate-optional/src/main/resources/application.properties new file mode 100644 index 000000000000..7e90813e59b2 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=8080 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-file-delegate-optional/src/main/resources/openapi.yaml new file mode 100644 index 000000000000..a7945845ef65 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/resources/openapi.yaml @@ -0,0 +1,26 @@ +openapi: 3.0.3 +info: + description: "" + title: Issue 18345 + version: 1.0.0 +servers: +- url: / +paths: + /dummy: + post: + description: "" + operationId: uploadFile + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + "200": + description: successful operation + x-content-type: application/octet-stream + x-accepts: + - application/json +components: + schemas: {} diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java b/samples/server/petstore/springboot-file-delegate-optional/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java new file mode 100644 index 000000000000..3681f67e7705 --- /dev/null +++ b/samples/server/petstore/springboot-file-delegate-optional/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java @@ -0,0 +1,13 @@ +package org.openapitools; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class OpenApiGeneratorApplicationTests { + + @Test + void contextLoads() { + } + +} \ No newline at end of file