Skip to content

Commit 754c7d2

Browse files
author
andrewwilsonnew
committed
fixing file etc.
1 parent 1bcff51 commit 754c7d2

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

modules/openapi-generator/src/main/resources/kotlin-misk/apiController.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import okhttp3.Headers
4848
@RequestContentType({{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}){{/hasConsumes}}{{#hasProduces}}
4949
@ResponseContentType({{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}){{/hasProduces}}
5050
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
51-
fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>cookieParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}){{#returnType}}: {{{returnType}}}{{/returnType}} {
51+
fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>cookieParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: {{{returnType}}}{{/returnType}} {
5252
TODO()
5353
}
5454
{{/operation}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isFormParam}}{{^isFile}}{{#useBeanValidation}}@Valid{{/useBeanValidation}}@QueryParam("{{baseName}}") {{{paramName}}}: {{>optionalDataType}}{{/isFile}}{{/isFormParam}}
1+
{{#isFormParam}}{{^isFile}}{{#isModel}}@RequestPart{{/isModel}}{{^isModel}}@QueryParam{{/isModel}}(value = "{{baseName}}") {{{paramName}}}: {{>optionalDataType}} {{/isFile}}{{#isFile}}{{#useBeanValidation}}@Valid{{/useBeanValidation}} {{{paramName}}}: {{>optionalDataType}}HttpCall{{/isFile}}{{/isFormParam}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{^isFile}}{{{dataType}}}{{^required}}{{^defaultValue}}?{{/defaultValue}}{{/required}}{{/isFile}}{{#isFile}}{{#isArray}}Array<{{/isArray}}Headers{{#isArray}}>{{/isArray}}{{^isArray}}{{^required}}{{/required}}{{/isArray}}{{/isFile}}
1+
{{^isFile}}{{{dataType}}}{{^required}}{{^defaultValue}}?{{/defaultValue}}{{/required}}{{/isFile}}{{#isFile}}{{#isArray}}Array<{{/isArray}}{{#isArray}}>{{/isArray}}{{^isArray}}{{^required}}{{/required}}{{/isArray}}{{/isFile}}

samples/server/petstore/kotlin-misk/src/main/kotlin/org/openapitools/server/api/api/PetApiController.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import okhttp3.Headers
5151
@Delete("/pet/{petId}")
5252
@Description("Deletes a pet")
5353
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
54-
fun deletePet(@PathParam("petId") petId: kotlin.Long,apiKey: Headers) {
54+
fun deletePet(@PathParam("petId") petId: kotlin.Long, apiKey: Headers) {
5555
TODO()
5656
}
5757

@@ -92,7 +92,7 @@ import okhttp3.Headers
9292
@Description("Updates a pet in the store with form data")
9393
@RequestContentType(MediaTypes.APPLICATION_FORM_URLENCODED)
9494
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
95-
fun updatePetWithForm(@PathParam("petId") petId: kotlin.Long,@Valid@QueryParam("name") name: kotlin.String?,@Valid@QueryParam("status") status: kotlin.String?) {
95+
fun updatePetWithForm(@PathParam("petId") petId: kotlin.Long, @QueryParam(value = "name") name: kotlin.String? , @QueryParam(value = "status") status: kotlin.String? ) {
9696
TODO()
9797
}
9898

@@ -101,7 +101,7 @@ import okhttp3.Headers
101101
@RequestContentType(MediaTypes.APPLICATION_OCTETSTREAM /* unknown -> multipart/form-data */ )
102102
@ResponseContentType(MediaTypes.APPLICATION_JSON)
103103
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
104-
fun uploadFile(@PathParam("petId") petId: kotlin.Long,@Valid@QueryParam("additionalMetadata") additionalMetadata: kotlin.String?,): ModelApiResponse {
104+
fun uploadFile(@PathParam("petId") petId: kotlin.Long, @QueryParam(value = "additionalMetadata") additionalMetadata: kotlin.String? , @Valid file: HttpCall): ModelApiResponse {
105105
TODO()
106106
}
107107
}

samples/server/petstore/kotlin-misk/src/main/kotlin/org/openapitools/server/api/api/UserApiController.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import okhttp3.Headers
8181
@Description("Logs user into the system")
8282
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
8383
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
84-
fun loginUser( @QueryParam(value = "username") username: kotlin.String, @QueryParam(value = "password") password: kotlin.String): kotlin.String {
84+
fun loginUser( @QueryParam(value = "username") username: kotlin.String, @QueryParam(value = "password") password: kotlin.String): kotlin.String {
8585
TODO()
8686
}
8787

@@ -96,7 +96,7 @@ import okhttp3.Headers
9696
@Description("Updated user")
9797
@RequestContentType(MediaTypes.APPLICATION_JSON)
9898
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
99-
fun updateUser(@PathParam("username") username: kotlin.String,@Valid @RequestBody user: User) {
99+
fun updateUser(@PathParam("username") username: kotlin.String, @Valid @RequestBody user: User) {
100100
TODO()
101101
}
102102
}

0 commit comments

Comments
 (0)