openapi-generator-original/samples/server/petstore/kotlin-springboot-source-swagger1
Fionn O'Connor e131d52ad0
[kotlin-spring] Handle arrays of files correctly using MultipartFile (#20108)
* [kotlin-spring] Fix no List being used for an array of files using multipart/form-data

* [kotlin-spring] Use Spring's MultipartFile class for incoming Files instead of Spring's Resource class.

* [kotlin-spring] Add test to ensure that return type for files is `org.springframework.core.io.Resource`

* [kotlin-spring] Ensure Array is used for lists of files in generated Api class

* Update samples

* [kotlin-spring] Move conditional usage of MultipartFile to optionalDataType.mustache. Update samples

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-12-04 15:24:47 +08:00
..

openAPIPetstore

This Kotlin based Spring Boot application has been generated using the OpenAPI Generator.

Getting Started

This document assumes you have either maven or gradle available, either via the wrapper or otherwise. This does not come with a gradle / maven wrapper checked in.

By default a pom.xml file will be generated. If you specified gradleBuildFile=true when generating this project, a build.gradle.kts will also be generated. Note this uses Gradle Kotlin DSL.

To build the project using maven, run:

mvn package && java -jar target/openapi-spring-1.0.0.jar

To build the project using gradle, run:

gradle build && java -jar build/libs/openapi-spring-1.0.0.jar

If all builds successfully, the server should run on http://localhost:8080/