mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 02:37:08 +00:00
[Kotlin Spring] fix template request part and description (#17821)
* [kotlin-spring] Parameter Name and Description are now used properly in multipart form endpoints * [kotlin-spring] Parameter Name and Description are now used properly in multipart form endpoints (generated docs and samples) * [kotlin-spring] Parameter Name and Description are now used properly in multipart form endpoints (generated docs and samples) --------- Co-authored-by: Kevin Hahn <kevin.hahn@partner.ionity.eu>
This commit is contained in:
@@ -175,7 +175,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
|
||||
produces = ["application/json"],
|
||||
consumes = ["multipart/form-data"]
|
||||
)
|
||||
fun uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource?): ResponseEntity<ModelApiResponse> {
|
||||
fun uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file", required = false) file: org.springframework.core.io.Resource?): ResponseEntity<ModelApiResponse> {
|
||||
return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user