Skip to content

Commit 7bc73e1

Browse files
committed
update samples
1 parent 9713d9f commit 7bc73e1

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

  • samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api

samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,40 @@ ResponseEntity<Pet> getPetById(
210210
);
211211

212212

213+
String PATH_LIST_ALL_PETS = "/pet/all";
214+
/**
215+
* GET /pet/all : List all pets
216+
* Returns all pets with pagination support
217+
*
218+
* @return successful operation (status code 200)
219+
* or Invalid status value (status code 400)
220+
*/
221+
@Operation(
222+
operationId = "listAllPets",
223+
summary = "List all pets",
224+
description = "Returns all pets with pagination support",
225+
tags = { "pet" },
226+
responses = {
227+
@ApiResponse(responseCode = "200", description = "successful operation", content = {
228+
@Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class))),
229+
@Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))
230+
}),
231+
@ApiResponse(responseCode = "400", description = "Invalid status value")
232+
},
233+
security = {
234+
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
235+
}
236+
)
237+
@RequestMapping(
238+
method = RequestMethod.GET,
239+
value = PetApi.PATH_LIST_ALL_PETS,
240+
produces = { "application/json", "application/xml" }
241+
)
242+
ResponseEntity<List<Pet>> listAllPets(
243+
@ParameterObject final Pageable pageable
244+
);
245+
246+
213247
String PATH_UPDATE_PET = "/pet";
214248
/**
215249
* PUT /pet : Update an existing pet

0 commit comments

Comments
 (0)