mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 00:22:43 +00:00
* add spring support for SSE conform specs see https://github.com/OpenAPITools/openapi-generator/issues/6123 for the ongoing discussion * extend generator option documentation * applied review suggestions * regenerated samples * regenerated docu * fix code style: removed tabs
This commit is contained in:
@@ -44,6 +44,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json", "application/xml" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Pet> addPet(
|
||||
@Valid @RequestBody Pet pet
|
||||
) {
|
||||
@@ -77,6 +78,7 @@ public interface PetApi {
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@PathVariable("petId") Long petId
|
||||
) {
|
||||
@@ -98,6 +100,7 @@ public interface PetApi {
|
||||
value = "/pet/findByStatus",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@NotNull @Valid @RequestParam(value = "status", required = true) @Deprecated List<String> status
|
||||
) {
|
||||
@@ -135,6 +138,7 @@ public interface PetApi {
|
||||
value = "/pet/findByTags",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
) {
|
||||
@@ -171,6 +175,7 @@ public interface PetApi {
|
||||
value = "/pet/{petId}",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@PathVariable("petId") Long petId
|
||||
) {
|
||||
@@ -211,6 +216,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json", "application/xml" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Pet> updatePet(
|
||||
@Valid @RequestBody Pet pet
|
||||
) {
|
||||
@@ -247,6 +253,7 @@ public interface PetApi {
|
||||
value = "/pet/{petId}",
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@PathVariable("petId") Long petId,
|
||||
@Valid @RequestParam(value = "name", required = false) String name,
|
||||
@@ -272,6 +279,7 @@ public interface PetApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@PathVariable("petId") Long petId,
|
||||
@Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
|
||||
@@ -42,6 +42,7 @@ public interface StoreApi {
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@PathVariable("orderId") String orderId
|
||||
) {
|
||||
@@ -61,6 +62,7 @@ public interface StoreApi {
|
||||
value = "/store/inventory",
|
||||
produces = { "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Map<String, Integer>> getInventory(
|
||||
|
||||
) {
|
||||
@@ -83,6 +85,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @PathVariable("orderId") Long orderId
|
||||
) {
|
||||
@@ -119,6 +122,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Order> placeOrder(
|
||||
@Valid @RequestBody Order order
|
||||
) {
|
||||
|
||||
@@ -42,6 +42,7 @@ public interface UserApi {
|
||||
value = "/user",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> createUser(
|
||||
@Valid @RequestBody User user
|
||||
) {
|
||||
@@ -62,6 +63,7 @@ public interface UserApi {
|
||||
value = "/user/createWithArray",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> createUsersWithArrayInput(
|
||||
@Valid @RequestBody List<User> user
|
||||
) {
|
||||
@@ -82,6 +84,7 @@ public interface UserApi {
|
||||
value = "/user/createWithList",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> createUsersWithListInput(
|
||||
@Valid @RequestBody List<User> user
|
||||
) {
|
||||
@@ -102,6 +105,7 @@ public interface UserApi {
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/user/{username}"
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@PathVariable("username") String username
|
||||
) {
|
||||
@@ -124,6 +128,7 @@ public interface UserApi {
|
||||
value = "/user/{username}",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@PathVariable("username") String username
|
||||
) {
|
||||
@@ -160,6 +165,7 @@ public interface UserApi {
|
||||
value = "/user/login",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<String> loginUser(
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Valid @RequestParam(value = "password", required = true) String password
|
||||
@@ -179,6 +185,7 @@ public interface UserApi {
|
||||
method = RequestMethod.GET,
|
||||
value = "/user/logout"
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> logoutUser(
|
||||
|
||||
) {
|
||||
@@ -201,6 +208,7 @@ public interface UserApi {
|
||||
value = "/user/{username}",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@PathVariable("username") String username,
|
||||
@Valid @RequestBody User user
|
||||
|
||||
Reference in New Issue
Block a user