Skip to content

Commit

Permalink
update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Jan 11, 2025
1 parent 0c47ca2 commit 67ee723
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
value = ["/pet/findByStatus"],
produces = ["application/xml", "application/json"]
)
fun findPetsByStatus(@NotNull @Parameter(description = "Status values that need to be considered for filter", required = true, schema = Schema(allowableValues = ["available", "pending", "sold"])) @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List<kotlin.String>): ResponseEntity<List<Pet>> {
fun findPetsByStatus(@NotNull @Parameter(description = "Status values that need to be considered for filter", required = true, schema = Schema(allowableValues = ["available", "pending", "sold"])) @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List<kotlin.String>): ResponseEntity<Flow<Pet>> {
return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200))
}

Expand All @@ -102,7 +102,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
value = ["/pet/findByTags"],
produces = ["application/xml", "application/json"]
)
fun findPetsByTags(@NotNull @Parameter(description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List<kotlin.String>): ResponseEntity<List<Pet>> {
fun findPetsByTags(@NotNull @Parameter(description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List<kotlin.String>): ResponseEntity<Flow<Pet>> {
return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface PetApiService {
* or Invalid status value (status code 400)
* @see PetApi#findPetsByStatus
*/
fun findPetsByStatus(status: kotlin.collections.List<kotlin.String>): List<Pet>
fun findPetsByStatus(status: kotlin.collections.List<kotlin.String>): Flow<Pet>

/**
* GET /pet/findByTags : Finds Pets by tags
Expand All @@ -49,7 +49,7 @@ interface PetApiService {
* @deprecated
* @see PetApi#findPetsByTags
*/
fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>): List<Pet>
fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>): Flow<Pet>

/**
* GET /pet/{petId} : Find pet by ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class PetApiServiceImpl : PetApiService {
TODO("Implement me")
}

override fun findPetsByStatus(status: kotlin.collections.List<kotlin.String>): List<Pet> {
override fun findPetsByStatus(status: kotlin.collections.List<kotlin.String>): Flow<Pet> {
TODO("Implement me")
}

override fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>): List<Pet> {
override fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>): Flow<Pet> {
TODO("Implement me")
}

Expand Down

0 comments on commit 67ee723

Please sign in to comment.