Skip to content

Commit 6523bf5

Browse files
committed
fixed alignment according to actual master
1 parent ab48454 commit 6523bf5

File tree

1 file changed

+33
-40
lines changed
  • samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api

1 file changed

+33
-40
lines changed

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

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,10 @@ public interface PetApi {
4646
* @param body Pet object that needs to be added to the store (required)
4747
* @return Invalid input (status code 405)
4848
*/
49-
@Operation(summary = "Add a new pet to the store", description = "",
50-
tags={ "pet", },
51-
responses = {
52-
@ApiResponse(responseCode = "405", description = "Invalid input" ) })
53-
@RequestMapping(value = "/pet",
54-
consumes = "application/json",
55-
method = RequestMethod.POST)
49+
@Operation(summary = "Add a new pet to the store", description = "",tags={ "pet", } responses
50+
= {
51+
@ApiResponse(responseCode = "405", description = "Invalid input")})
52+
@RequestMapping(value = "/pet", consumes = "application/json", method = RequestMethod.POST)
5653
CompletableFuture<ResponseEntity<Void>> addPet(@Parameter(description = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
5754

5855

@@ -63,12 +60,10 @@ public interface PetApi {
6360
* @param apiKey (optional)
6461
* @return Invalid pet value (status code 400)
6562
*/
66-
@Operation(summary = "Deletes a pet", description = "",
67-
tags={ "pet", },
68-
responses = {
69-
@ApiResponse(responseCode = "400", description = "Invalid pet value" ) })
70-
@RequestMapping(value = "/pet/{petId}",
71-
method = RequestMethod.DELETE)
63+
@Operation(summary = "Deletes a pet", description = "",responses = {
64+
@ApiResponse(responseCode = "400", description = "Invalid pet value" )
65+
}, tags={ "pet", })
66+
@RequestMapping(value = "/pet/{petId}", method = RequestMethod.DELETE)
7267
CompletableFuture<ResponseEntity<Void>> deletePet(@Parameter(in = ParameterIn.PATH,description = "Pet id to delete", required=true) @PathVariable("petId") Long petId,@Parameter(in = ParameterIn.HEADER, description = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
7368

7469

@@ -80,14 +75,11 @@ public interface PetApi {
8075
* @return successful operation (status code 200)
8176
* or Invalid status value (status code 400)
8277
*/
83-
@Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings",
84-
tags={ "pet", },
85-
responses = {
86-
@ApiResponse(responseCode = "200", description = "successful operation" , content = { @Content( schema = @Schema(implementation = Pet.class) )} ) ,
87-
@ApiResponse(responseCode = "400", description = "Invalid status value" ) })
88-
@RequestMapping(value = "/pet/findByStatus",
89-
produces = "application/json",
90-
method = RequestMethod.GET)
78+
@Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings",responses = {
79+
@ApiResponse(responseCode = "200", description = "successful operation", content = { @Content( schema = @Schema(implementation = Pet.class) )} ),
80+
@ApiResponse(responseCode = "400", description = "Invalid status value") }
81+
, tags={ "pet", })
82+
@RequestMapping(value = "/pet/findByStatus",produces = "application/json", method = RequestMetho.GET)
9183
CompletableFuture<ResponseEntity<List<Pet>>> findPetsByStatus(@NotNull @Parameter(schema = @Schema(allowableValues = {"available, pending, sold"}, description = "Status values that need to be considered for filter", required = true)) @Valid @RequestParam(value = "status", required = true) List<String> status);
9284

9385

@@ -102,11 +94,12 @@ public interface PetApi {
10294
*/
10395
@Operation(summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
10496
tags={ "pet", },
105-
responses = {
106-
@ApiResponse(responseCode = "200", description = "successful operation" , content = { @Content( schema = @Schema(implementation = Pet.class) )} ) ,
107-
@ApiResponse(responseCode = "400", description = "Invalid tag value" ) })
108-
@RequestMapping(value = "/pet/findByTags",
109-
produces = "application/json",
97+
responses = {
98+
@ApiResponse(responseCode = "200", description = "successful operation", content
99+
= { @Content( schema = @Schema(implementation = Pet.class) )} ),
100+
@ApiResponse(responseCode = "400", description = "Invalid tag value") })
101+
@RequestMapping(value = "/pet/findByTags",
102+
produces = "application/json",
110103
method = RequestMethod.GET)
111104
CompletableFuture<ResponseEntity<List<Pet>>> findPetsByTags(@NotNull @Parameter(schema = @Schema( description = "Tags to filter by", required = true)) @Valid @RequestParam(value = "tags", required = true) List<String> tags);
112105

@@ -123,11 +116,11 @@ public interface PetApi {
123116
@Operation(summary = "Find pet by ID", description = "Returns a single pet",
124117
tags={ "pet", },
125118
responses = {
126-
@ApiResponse(responseCode = "200", description = "successful operation" , content = { @Content( array = @ArraySchema(schema = @Schema(implementation = Pet.class)) )} ) ,
127-
@ApiResponse(responseCode = "400", description = "Invalid ID supplied" ) ,
128-
@ApiResponse(responseCode = "404", description = "Pet not found" ) })
129-
@RequestMapping(value = "/pet/{petId}",
130-
produces = "application/json",
119+
@ApiResponse(responseCode = "200", description = "successful operation" , content = { @Content( array = @ArraySchema(schema = @Schema(implementation = Pet.class)) )} ) ,
120+
@ApiResponse(responseCode = "400", description = "Invalid ID supplied" ) ,
121+
@ApiResponse(responseCode = "404", description = "Pet not found" ) })
122+
@RequestMapping(value = "/pet/{petId}",
123+
produces = "application/json",
131124
method = RequestMethod.GET)
132125
CompletableFuture<ResponseEntity<Pet>> getPetById(@Parameter(in = ParameterIn.PATH,description = "ID of pet to return", required=true) @PathVariable("petId") Long petId);
133126

@@ -143,10 +136,10 @@ public interface PetApi {
143136
@Operation(summary = "Update an existing pet", description = "",
144137
tags={ "pet", },
145138
responses = {
146-
@ApiResponse(responseCode = "400", description = "Invalid ID supplied" ) ,
147-
@ApiResponse(responseCode = "404", description = "Pet not found" ) ,
148-
@ApiResponse(responseCode = "405", description = "Validation exception" ) })
149-
@RequestMapping(value = "/pet",
139+
@ApiResponse(responseCode = "400", description = "Invalid ID supplied" ) ,
140+
@ApiResponse(responseCode = "404", description = "Pet not found" ) ,
141+
@ApiResponse(responseCode = "405", description = "Validation exception" ) })
142+
@RequestMapping(value = "/pet",
150143
consumes = "application/json",
151144
method = RequestMethod.PUT)
152145
CompletableFuture<ResponseEntity<Void>> updatePet(@Parameter(description = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
@@ -163,11 +156,11 @@ public interface PetApi {
163156
@Operation(summary = "Updates a pet in the store with form data", description = "",
164157
tags={ "pet", },
165158
responses = {
166-
@ApiResponse(responseCode = "405", description = "Invalid input" ) })
167-
@RequestMapping(value = "/pet/{petId}",
159+
@ApiResponse(responseCode = "405", description = "Invalid input" ) })
160+
@RequestMapping(value = "/pet/{petId}",
168161
consumes = "application/x-www-form-urlencoded",
169162
method = RequestMethod.POST)
170-
CompletableFuture<ResponseEntity<Void>> updatePetWithForm(@Parameter(in = ParameterIn.PATH,description = "ID of pet that needs to be updated", required=true) @PathVariable("petId") Long petId,@Parameter( description = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@Parameter( description = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status);
163+
CompletableFuture<ResponseEntity<Void>> updatePetWithForm(@Parameter(in = ParameterIn.PATH,description = "ID of pet that needs to be updated",required=true) @PathVariable("petId") Long petId,@Parameter( description = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@Parameter( description = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status);
171164

172165

173166
/**
@@ -181,8 +174,8 @@ public interface PetApi {
181174
@Operation(summary = "uploads an image", description = "",
182175
tags={ "pet", },
183176
responses = {
184-
@ApiResponse(responseCode = "200", description = "successful operation" , content = { @Content( array = @ArraySchema(schema = @Schema(implementation = ModelApiResponse.class)) )} ) })
185-
@RequestMapping(value = "/pet/{petId}/uploadImage",
177+
@ApiResponse(responseCode = "200", description = "successful operation" , content = { @Content( array = @ArraySchema(schema = @Schema(implementation = ModelApiResponse.class)) )} ) })
178+
@RequestMapping(value = "/pet/{petId}/uploadImage",
186179
produces = "application/json",
187180
consumes = "multipart/form-data",
188181
method = RequestMethod.POST)

0 commit comments

Comments
 (0)