From 1bcf79236fc543baf2e909f07af5843f2f262bc1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 21 Sep 2023 17:19:35 +0800 Subject: [PATCH] update samples --- .../src/main/java/org/openapitools/api/PetApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/StoreApi.java | 4 ++++ .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../main/java/org/openapitools/virtualan/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + 17 files changed, 34 insertions(+) diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java index 0747d411987..431b8861bfb 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ public interface PetApi { value = "/pet", consumes = "application/json" ) + ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -91,6 +92,7 @@ public interface PetApi { method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -126,6 +128,7 @@ public interface PetApi { value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status ); @@ -163,6 +166,7 @@ public interface PetApi { value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ); @@ -199,6 +203,7 @@ public interface PetApi { value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @Parameter(name = "petId", deprecated = true, description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @Deprecated Long petId ); @@ -232,6 +237,7 @@ public interface PetApi { value = "/pet", consumes = "application/json" ) + ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -263,6 +269,7 @@ public interface PetApi { value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -299,6 +306,7 @@ public interface PetApi { produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java index 65ce02af1be..cd1427025e5 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -90,6 +91,7 @@ public interface StoreApi { value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -123,6 +125,7 @@ public interface StoreApi { value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ); @@ -155,6 +158,7 @@ public interface StoreApi { produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ); diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java index 08e01a9b9e5..6af526a12e9 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java @@ -62,6 +62,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ); @@ -91,6 +92,7 @@ public interface UserApi { value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -120,6 +122,7 @@ public interface UserApi { value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -150,6 +153,7 @@ public interface UserApi { method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -183,6 +187,7 @@ public interface UserApi { value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -215,6 +220,7 @@ public interface UserApi { value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", deprecated = true, description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) @Deprecated String password @@ -243,6 +249,7 @@ public interface UserApi { method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -275,6 +282,7 @@ public interface UserApi { value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 1bcacb3f62f..b322430fbd4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -486,6 +486,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = "application/json" ) + ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 0354411cc1f..ec2981e0236 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -542,6 +542,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 480aa991b77..f9de7344ba4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -587,6 +587,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 2d8c4224370..e2a4f6e93af 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -514,6 +514,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) throws Exception; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 2585fd56770..00ece07e0c1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 2585fd56770..00ece07e0c1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 59befce8d62..c45620b8dae 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -535,6 +535,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 59befce8d62..c45620b8dae 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -535,6 +535,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index c34845d52ae..c1dca403316 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index adc9085a3db..77fdd3109b3 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -569,6 +569,7 @@ public interface FakeApi { consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono childWithNullable, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index e5963b17030..4916727a2dc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -554,6 +554,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default Mono> testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono childWithNullable, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index c159d9dd71a..b7765e99b8f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index e9d943cdee9..cdabe80efd8 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -605,6 +605,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 64bc1021c9b..770ca405dae 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ public interface FakeApi { value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullableDto childWithNullableDto ) {