|
| 1 | +/* |
| 2 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). |
| 3 | + * https://openapi-generator.tech |
| 4 | + * Do not edit the class manually. |
| 5 | + */ |
| 6 | +package org.openapitools.api; |
| 7 | + |
| 8 | +import java.util.Map; |
| 9 | +import org.openapitools.model.Order; |
| 10 | +import io.swagger.annotations.*; |
| 11 | +import org.springframework.http.ResponseEntity; |
| 12 | +import org.springframework.validation.annotation.Validated; |
| 13 | +import org.springframework.web.bind.annotation.*; |
| 14 | +import org.springframework.web.multipart.MultipartFile; |
| 15 | + |
| 16 | +import javax.validation.Valid; |
| 17 | +import javax.validation.constraints.*; |
| 18 | +import java.util.List; |
| 19 | +import java.util.Map; |
| 20 | +import javax.annotation.Generated; |
| 21 | + |
| 22 | +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") |
| 23 | +@Validated |
| 24 | +@Api(value = "store", description = "Access to Petstore orders") |
| 25 | +public interface StoreApi { |
| 26 | + |
| 27 | + default StoreApiDelegate getDelegate() { |
| 28 | + return new StoreApiDelegate() {}; |
| 29 | + } |
| 30 | + |
| 31 | + String PATH_DELETE_ORDER = "/store/order/{order_id}"; |
| 32 | + /** |
| 33 | + * DELETE /store/order/{order_id} : Delete purchase order by ID |
| 34 | + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors |
| 35 | + * |
| 36 | + * @param orderId ID of the order that needs to be deleted (required) |
| 37 | + * @return Invalid ID supplied (status code 400) |
| 38 | + * or Order not found (status code 404) |
| 39 | + */ |
| 40 | + @ApiOperation( |
| 41 | + tags = { "store" }, |
| 42 | + value = "Delete purchase order by ID", |
| 43 | + nickname = "deleteOrder", |
| 44 | + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" |
| 45 | + ) |
| 46 | + @ApiResponses({ |
| 47 | + @ApiResponse(code = 400, message = "Invalid ID supplied"), |
| 48 | + @ApiResponse(code = 404, message = "Order not found") |
| 49 | + }) |
| 50 | + @RequestMapping( |
| 51 | + method = RequestMethod.DELETE, |
| 52 | + value = StoreApi.PATH_DELETE_ORDER |
| 53 | + ) |
| 54 | + default ResponseEntity<Void> deleteOrder( |
| 55 | + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId |
| 56 | + ) { |
| 57 | + return getDelegate().deleteOrder(orderId); |
| 58 | + } |
| 59 | + |
| 60 | + |
| 61 | + String PATH_GET_INVENTORY = "/store/inventory"; |
| 62 | + /** |
| 63 | + * GET /store/inventory : Returns pet inventories by status |
| 64 | + * Returns a map of status codes to quantities |
| 65 | + * |
| 66 | + * @return successful operation (status code 200) |
| 67 | + */ |
| 68 | + @ApiOperation( |
| 69 | + tags = { "store" }, |
| 70 | + value = "Returns pet inventories by status", |
| 71 | + nickname = "getInventory", |
| 72 | + notes = "Returns a map of status codes to quantities", |
| 73 | + response = Integer.class, |
| 74 | + responseContainer = "Map", |
| 75 | + authorizations = { |
| 76 | + @Authorization(value = "api_key") |
| 77 | + } |
| 78 | + ) |
| 79 | + @ApiResponses({ |
| 80 | + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") |
| 81 | + }) |
| 82 | + @RequestMapping( |
| 83 | + method = RequestMethod.GET, |
| 84 | + value = StoreApi.PATH_GET_INVENTORY, |
| 85 | + produces = { "application/json" } |
| 86 | + ) |
| 87 | + default ResponseEntity<Map<String, Integer>> getInventory( |
| 88 | + |
| 89 | + ) { |
| 90 | + return getDelegate().getInventory(); |
| 91 | + } |
| 92 | + |
| 93 | + |
| 94 | + String PATH_GET_ORDER_BY_ID = "/store/order/{order_id}"; |
| 95 | + /** |
| 96 | + * GET /store/order/{order_id} : Find purchase order by ID |
| 97 | + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions |
| 98 | + * |
| 99 | + * @param orderId ID of pet that needs to be fetched (required) |
| 100 | + * @return successful operation (status code 200) |
| 101 | + * or Invalid ID supplied (status code 400) |
| 102 | + * or Order not found (status code 404) |
| 103 | + */ |
| 104 | + @ApiOperation( |
| 105 | + tags = { "store" }, |
| 106 | + value = "Find purchase order by ID", |
| 107 | + nickname = "getOrderById", |
| 108 | + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", |
| 109 | + response = Order.class |
| 110 | + ) |
| 111 | + @ApiResponses({ |
| 112 | + @ApiResponse(code = 200, message = "successful operation", response = Order.class), |
| 113 | + @ApiResponse(code = 400, message = "Invalid ID supplied"), |
| 114 | + @ApiResponse(code = 404, message = "Order not found") |
| 115 | + }) |
| 116 | + @RequestMapping( |
| 117 | + method = RequestMethod.GET, |
| 118 | + value = StoreApi.PATH_GET_ORDER_BY_ID, |
| 119 | + produces = { "application/xml", "application/json" } |
| 120 | + ) |
| 121 | + default ResponseEntity<Order> getOrderById( |
| 122 | + @NotNull @Min(value = 1L) @Max(value = 5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId |
| 123 | + ) { |
| 124 | + return getDelegate().getOrderById(orderId); |
| 125 | + } |
| 126 | + |
| 127 | + |
| 128 | + String PATH_PLACE_ORDER = "/store/order"; |
| 129 | + /** |
| 130 | + * POST /store/order : Place an order for a pet |
| 131 | + * |
| 132 | + * @param body order placed for purchasing the pet (required) |
| 133 | + * @return successful operation (status code 200) |
| 134 | + * or Invalid Order (status code 400) |
| 135 | + */ |
| 136 | + @ApiOperation( |
| 137 | + tags = { "store" }, |
| 138 | + value = "Place an order for a pet", |
| 139 | + nickname = "placeOrder", |
| 140 | + notes = "", |
| 141 | + response = Order.class |
| 142 | + ) |
| 143 | + @ApiResponses({ |
| 144 | + @ApiResponse(code = 200, message = "successful operation", response = Order.class), |
| 145 | + @ApiResponse(code = 400, message = "Invalid Order") |
| 146 | + }) |
| 147 | + @RequestMapping( |
| 148 | + method = RequestMethod.POST, |
| 149 | + value = StoreApi.PATH_PLACE_ORDER, |
| 150 | + produces = { "application/xml", "application/json" } |
| 151 | + ) |
| 152 | + default ResponseEntity<Order> placeOrder( |
| 153 | + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body |
| 154 | + ) { |
| 155 | + return getDelegate().placeOrder(body); |
| 156 | + } |
| 157 | + |
| 158 | +} |
0 commit comments