Skip to content

Commit cb9bc1e

Browse files
committed
regenerate files
1 parent b4bf157 commit cb9bc1e

4 files changed

Lines changed: 27 additions & 26 deletions

File tree

bin/configs/kotlin-spring-boot-x-kotlin-implements.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
66
additionalProperties:
77
documentationProvider: none
88
annotationLibrary: none
9-
useSwaggerUI: "false"
10-
serviceImplementation: "false"
11-
skipDefaultInterface: "true"
12-
interfaceOnly: "true"
13-
serializableModel: "true"
14-
beanValidations: "true"
9+
useSwaggerUI: false
10+
serviceImplementation: false
11+
skipDefaultInterface: true
12+
interfaceOnly: true
13+
serializableModel: true
14+
beanValidations: true
15+
includeHttpRequestContext: true

samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/api/PetApi.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,54 +39,54 @@ interface PetApi {
3939
value = ["/pet"],
4040
consumes = ["application/json"]
4141
)
42-
fun addPet( @Valid @RequestBody pet: Pet): ResponseEntity<Unit>
42+
fun addPet( @Valid @RequestBody pet: Pet, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
4343

4444

4545
@RequestMapping(
4646
method = [RequestMethod.DELETE],
4747
value = ["/pet/{petId}"]
4848
)
49-
fun deletePet( @PathVariable("petId") petId: kotlin.Long, @RequestHeader(value = "api_key", required = false) apiKey: kotlin.String?): ResponseEntity<Unit>
49+
fun deletePet( @PathVariable("petId") petId: kotlin.Long, @RequestHeader(value = "api_key", required = false) apiKey: kotlin.String?, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
5050

5151

5252
@RequestMapping(
5353
method = [RequestMethod.GET],
5454
value = ["/pet/findByStatus"],
5555
produces = ["application/json"]
5656
)
57-
fun findPetsByStatus(@NotNull @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List<kotlin.String>): ResponseEntity<List<Pet>>
57+
fun findPetsByStatus(@NotNull @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List<kotlin.String>, request: javax.servlet.http.HttpServletRequest): ResponseEntity<List<Pet>>
5858

5959

6060
@RequestMapping(
6161
method = [RequestMethod.GET],
6262
value = ["/pet/findByTags"],
6363
produces = ["application/json"]
6464
)
65-
fun findPetsByTags(@NotNull @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List<kotlin.String>): ResponseEntity<List<Pet>>
65+
fun findPetsByTags(@NotNull @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List<kotlin.String>, request: javax.servlet.http.HttpServletRequest): ResponseEntity<List<Pet>>
6666

6767

6868
@RequestMapping(
6969
method = [RequestMethod.GET],
7070
value = ["/pet/{petId}"],
7171
produces = ["application/json"]
7272
)
73-
fun getPetById( @PathVariable("petId") petId: kotlin.Long): ResponseEntity<Pet>
73+
fun getPetById( @PathVariable("petId") petId: kotlin.Long, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Pet>
7474

7575

7676
@RequestMapping(
7777
method = [RequestMethod.PUT],
7878
value = ["/pet"],
7979
consumes = ["application/json"]
8080
)
81-
fun updatePet( @Valid @RequestBody pet: Pet): ResponseEntity<Unit>
81+
fun updatePet( @Valid @RequestBody pet: Pet, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
8282

8383

8484
@RequestMapping(
8585
method = [RequestMethod.POST],
8686
value = ["/pet/{petId}"],
8787
consumes = ["application/x-www-form-urlencoded"]
8888
)
89-
fun updatePetWithForm( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "name", required = false) name: kotlin.String? , @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity<Unit>
89+
fun updatePetWithForm( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "name", required = false) name: kotlin.String? , @Valid @RequestParam(value = "status", required = false) status: kotlin.String? , request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
9090

9191

9292
@RequestMapping(
@@ -95,5 +95,5 @@ interface PetApi {
9595
produces = ["application/json"],
9696
consumes = ["multipart/form-data"]
9797
)
98-
fun uploadFile( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? , @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile): ResponseEntity<ModelApiResponse>
98+
fun uploadFile( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? , @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile, request: javax.servlet.http.HttpServletRequest): ResponseEntity<ModelApiResponse>
9999
}

samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/api/StoreApi.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ interface StoreApi {
3737
method = [RequestMethod.DELETE],
3838
value = ["/store/order/{orderId}"]
3939
)
40-
fun deleteOrder( @PathVariable("orderId") orderId: kotlin.String): ResponseEntity<Unit>
40+
fun deleteOrder( @PathVariable("orderId") orderId: kotlin.String, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
4141

4242

4343
@RequestMapping(
4444
method = [RequestMethod.GET],
4545
value = ["/store/inventory"],
4646
produces = ["application/json"]
4747
)
48-
fun getInventory(): ResponseEntity<Map<String, kotlin.Int>>
48+
fun getInventory(request: javax.servlet.http.HttpServletRequest): ResponseEntity<Map<String, kotlin.Int>>
4949

5050

5151
@RequestMapping(
5252
method = [RequestMethod.GET],
5353
value = ["/store/order/{orderId}"],
5454
produces = ["application/json"]
5555
)
56-
fun getOrderById(@Min(value=1) @Max(value=5) @PathVariable("orderId") orderId: kotlin.Int): ResponseEntity<Order>
56+
fun getOrderById(@Min(value=1) @Max(value=5) @PathVariable("orderId") orderId: kotlin.Int, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Order>
5757

5858

5959
@RequestMapping(
@@ -62,5 +62,5 @@ interface StoreApi {
6262
produces = ["application/json"],
6363
consumes = ["application/json"]
6464
)
65-
fun placeOrder( @Valid @RequestBody order: Order): ResponseEntity<Order>
65+
fun placeOrder( @Valid @RequestBody order: Order, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Order>
6666
}

samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/api/UserApi.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,59 +38,59 @@ interface UserApi {
3838
value = ["/user"],
3939
consumes = ["application/json"]
4040
)
41-
fun createUser( @Valid @RequestBody user: User): ResponseEntity<Unit>
41+
fun createUser( @Valid @RequestBody user: User, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
4242

4343

4444
@RequestMapping(
4545
method = [RequestMethod.POST],
4646
value = ["/user/createWithArray"],
4747
consumes = ["application/json"]
4848
)
49-
fun createUsersWithArrayInput( @Valid @RequestBody user: kotlin.collections.List<User>): ResponseEntity<Unit>
49+
fun createUsersWithArrayInput( @Valid @RequestBody user: kotlin.collections.List<User>, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
5050

5151

5252
@RequestMapping(
5353
method = [RequestMethod.POST],
5454
value = ["/user/createWithList"],
5555
consumes = ["application/json"]
5656
)
57-
fun createUsersWithListInput( @Valid @RequestBody user: kotlin.collections.List<User>): ResponseEntity<Unit>
57+
fun createUsersWithListInput( @Valid @RequestBody user: kotlin.collections.List<User>, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
5858

5959

6060
@RequestMapping(
6161
method = [RequestMethod.DELETE],
6262
value = ["/user/{username}"]
6363
)
64-
fun deleteUser( @PathVariable("username") username: kotlin.String): ResponseEntity<Unit>
64+
fun deleteUser( @PathVariable("username") username: kotlin.String, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
6565

6666

6767
@RequestMapping(
6868
method = [RequestMethod.GET],
6969
value = ["/user/{username}"],
7070
produces = ["application/json"]
7171
)
72-
fun getUserByName( @PathVariable("username") username: kotlin.String): ResponseEntity<User>
72+
fun getUserByName( @PathVariable("username") username: kotlin.String, request: javax.servlet.http.HttpServletRequest): ResponseEntity<User>
7373

7474

7575
@RequestMapping(
7676
method = [RequestMethod.GET],
7777
value = ["/user/login"],
7878
produces = ["application/json"]
7979
)
80-
fun loginUser(@NotNull @Valid @RequestParam(value = "username", required = true) username: kotlin.String,@NotNull @Valid @RequestParam(value = "password", required = true) password: kotlin.String): ResponseEntity<kotlin.String>
80+
fun loginUser(@NotNull @Valid @RequestParam(value = "username", required = true) username: kotlin.String,@NotNull @Valid @RequestParam(value = "password", required = true) password: kotlin.String, request: javax.servlet.http.HttpServletRequest): ResponseEntity<kotlin.String>
8181

8282

8383
@RequestMapping(
8484
method = [RequestMethod.GET],
8585
value = ["/user/logout"]
8686
)
87-
fun logoutUser(): ResponseEntity<Unit>
87+
fun logoutUser(request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
8888

8989

9090
@RequestMapping(
9191
method = [RequestMethod.PUT],
9292
value = ["/user/{username}"],
9393
consumes = ["application/json"]
9494
)
95-
fun updateUser( @PathVariable("username") username: kotlin.String, @Valid @RequestBody user: User): ResponseEntity<Unit>
95+
fun updateUser( @PathVariable("username") username: kotlin.String, @Valid @RequestBody user: User, request: javax.servlet.http.HttpServletRequest): ResponseEntity<Unit>
9696
}

0 commit comments

Comments
 (0)