Skip to content

Commit 79ed89c

Browse files
halotukozakclaude
andcommitted
Update samples for kotlin jvm-ktor and javalin templates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a0f8750 commit 79ed89c

6 files changed

Lines changed: 16 additions & 16 deletions

File tree

  • samples
    • client/petstore
      • kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/apis
      • kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/apis
      • kotlin-jvm-ktor-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis
    • server/petstore/kotlin-server

samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ import java.text.DateFormat
8080
* @param status2 number type (optional)
8181
* @return void
8282
*/
83-
open suspend fun updatePetWithFormNumber(petId: kotlin.Long, name: kotlin.String?, status: kotlin.Int?, status2: java.math.BigDecimal?): HttpResponse<Unit> {
83+
open suspend fun updatePetWithFormNumber(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.Int? = null, status2: java.math.BigDecimal? = null): HttpResponse<Unit> {
8484

8585
val localVariableAuthNames = listOf<String>("petstore_auth")
8686

samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ import java.text.DateFormat
8080
* @param apiKey (optional)
8181
* @return void
8282
*/
83-
open suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): HttpResponse<Unit> {
83+
open suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): HttpResponse<Unit> {
8484

8585
val localVariableAuthNames = listOf<String>("petstore_auth")
8686

@@ -253,7 +253,7 @@ import java.text.DateFormat
253253
* @param status Updated status of the pet (optional)
254254
* @return void
255255
*/
256-
open suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): HttpResponse<Unit> {
256+
open suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): HttpResponse<Unit> {
257257

258258
val localVariableAuthNames = listOf<String>("petstore_auth")
259259

@@ -292,7 +292,7 @@ import java.text.DateFormat
292292
* @return ModelApiResponse
293293
*/
294294
@Suppress("UNCHECKED_CAST")
295-
open suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider>?): HttpResponse<ModelApiResponse> {
295+
open suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider>? = null): HttpResponse<ModelApiResponse> {
296296

297297
val localVariableAuthNames = listOf<String>("petstore_auth")
298298

samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
7777
* @param apiKey (optional)
7878
* @return void
7979
*/
80-
open suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): HttpResponse<Unit> {
80+
open suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): HttpResponse<Unit> {
8181

8282
val localVariableAuthNames = listOf<String>("petstore_auth")
8383

@@ -249,7 +249,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
249249
* @param status Updated status of the pet (optional)
250250
* @return void
251251
*/
252-
open suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): HttpResponse<Unit> {
252+
open suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): HttpResponse<Unit> {
253253

254254
val localVariableAuthNames = listOf<String>("petstore_auth")
255255

@@ -288,7 +288,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
288288
* @return ModelApiResponse
289289
*/
290290
@Suppress("UNCHECKED_CAST")
291-
open suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider>?): HttpResponse<ModelApiResponse> {
291+
open suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider>? = null): HttpResponse<ModelApiResponse> {
292292

293293
val localVariableAuthNames = listOf<String>("petstore_auth")
294294

samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/PetApi.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ import io.ktor.http.ParametersBuilder
7575
* @param apiKey (optional)
7676
* @return void
7777
*/
78-
open suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): HttpResponse<Unit> {
78+
open suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): HttpResponse<Unit> {
7979

8080
val localVariableAuthNames = listOf<String>("petstore_auth")
8181

@@ -248,7 +248,7 @@ import io.ktor.http.ParametersBuilder
248248
* @param status Updated status of the pet (optional)
249249
* @return void
250250
*/
251-
open suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): HttpResponse<Unit> {
251+
open suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): HttpResponse<Unit> {
252252

253253
val localVariableAuthNames = listOf<String>("petstore_auth")
254254

@@ -287,7 +287,7 @@ import io.ktor.http.ParametersBuilder
287287
* @return ModelApiResponse
288288
*/
289289
@Suppress("UNCHECKED_CAST")
290-
open suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider>?): HttpResponse<ModelApiResponse> {
290+
open suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider>? = null): HttpResponse<ModelApiResponse> {
291291

292292
val localVariableAuthNames = listOf<String>("petstore_auth")
293293

samples/server/petstore/kotlin-server/javalin-6/src/main/kotlin/org/openapitools/server/apis/PetApiService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface PetApiService {
2828
* @return Invalid pet value (status code 400)
2929
* @see PetApi#deletePet
3030
*/
31-
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?, ctx: Context): Unit
31+
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null, ctx: Context): Unit
3232

3333
/**
3434
* GET /pet/findByStatus : Finds Pets by status
@@ -95,7 +95,7 @@ interface PetApiService {
9595
* @return Invalid input (status code 405)
9696
* @see PetApi#updatePetWithForm
9797
*/
98-
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?, ctx: Context): Unit
98+
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null, ctx: Context): Unit
9999

100100
/**
101101
* POST /pet/{petId}/uploadImage : uploads an image
@@ -108,5 +108,5 @@ interface PetApiService {
108108
* @return successful operation (status code 200)
109109
* @see PetApi#uploadFile
110110
*/
111-
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: io.javalin.http.UploadedFile?, ctx: Context): ModelApiResponse
111+
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: io.javalin.http.UploadedFile? = null, ctx: Context): ModelApiResponse
112112
}

samples/server/petstore/kotlin-server/javalin/src/main/kotlin/org/openapitools/server/apis/PetApiService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface PetApiService {
2525
* @return Invalid pet value (status code 400)
2626
* @see PetApi#deletePet
2727
*/
28-
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit
28+
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Unit
2929

3030
/**
3131
* GET /pet/findByStatus : Finds Pets by status
@@ -87,7 +87,7 @@ interface PetApiService {
8787
* @return Invalid input (status code 405)
8888
* @see PetApi#updatePetWithForm
8989
*/
90-
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit
90+
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Unit
9191

9292
/**
9393
* POST /pet/{petId}/uploadImage : uploads an image
@@ -99,5 +99,5 @@ interface PetApiService {
9999
* @return successful operation (status code 200)
100100
* @see PetApi#uploadFile
101101
*/
102-
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: io.javalin.http.UploadedFile?): ModelApiResponse
102+
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: io.javalin.http.UploadedFile? = null): ModelApiResponse
103103
}

0 commit comments

Comments
 (0)