From ec28d6261cd0373ef6917967c4243fc19e3eebb0 Mon Sep 17 00:00:00 2001 From: GregDThomas Date: Sat, 13 Sep 2025 10:48:47 +0100 Subject: [PATCH] Fix #21921 by marking required path parameters as @NotNull (#21951) --- .../JavaSpring/beanValidationPathParams.mustache | 2 +- .../main/java/org/openapitools/api/DefaultApi.java | 4 ++-- .../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 | 6 +++--- .../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 | 6 +++--- .../java/org/openapitools/api/PetController.java | 8 ++++---- .../java/org/openapitools/api/StoreController.java | 4 ++-- .../java/org/openapitools/api/UserController.java | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../main/java/org/openapitools/api/DefaultApi.java | 4 ++-- .../src/main/java/org/openapitools/api/PetApi.java | 12 ++++++------ .../src/main/java/org/openapitools/api/StoreApi.java | 4 ++-- .../src/main/java/org/openapitools/api/UserApi.java | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../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 | 6 +++--- .../java/org/openapitools/api/VersioningApi.java | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../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 | 6 +++--- .../java/org/openapitools/api/VersioningApi.java | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../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 | 6 +++--- .../java/org/openapitools/api/VersioningApi.java | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../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 | 6 +++--- .../java/org/openapitools/api/VersioningApi.java | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- .../java/org/openapitools/virtualan/api/FakeApi.java | 4 ++-- .../java/org/openapitools/virtualan/api/PetApi.java | 8 ++++---- .../org/openapitools/virtualan/api/StoreApi.java | 4 ++-- .../java/org/openapitools/virtualan/api/UserApi.java | 6 +++--- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ++-- .../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 | 6 +++--- 142 files changed, 402 insertions(+), 402 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/beanValidationPathParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/beanValidationPathParams.mustache index 051bd53c0a5..84b68052401 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/beanValidationPathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/beanValidationPathParams.mustache @@ -1 +1 @@ -{{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} \ No newline at end of file +{{! PathParam is always required }}@NotNull {{>beanValidationCore}} \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index c79532a1142..52337a4cedc 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -54,7 +54,7 @@ public interface DefaultApi { ) ResponseEntity get( - @ApiParam(value = "A date path parameter", required = true, defaultValue = "1972-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @ApiParam(value = "A date path parameter", required = true, defaultValue = "1972-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @NotNull @ApiParam(value = "A date-time query parameter", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @NotNull @ApiParam(value = "A date header parameter", required = true, defaultValue = "1974-01-01") @RequestHeader(value = "X-Order-Date", required = true, defaultValue = "1974-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate, @ApiParam(value = "A date cookie parameter", defaultValue = "1975-01-01") @CookieValue(name = "loginDate", required = false, defaultValue = "1975-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate @@ -85,7 +85,7 @@ public interface DefaultApi { ) ResponseEntity updatePetWithForm( - @ApiParam(value = "A date path parameter", required = true, defaultValue = "1970-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @ApiParam(value = "A date path parameter", required = true, defaultValue = "1970-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @ApiParam(value = "Updated last visit timestamp", defaultValue = "1971-12-19T03:39:57-08:00") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); 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 41e5f676fa7..5baa7ceb560 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 @@ -98,7 +98,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ); @@ -212,7 +212,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @Parameter(name = "petId", deprecated = true, description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @Deprecated Long petId + @NotNull @Parameter(name = "petId", deprecated = true, description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @Deprecated Long petId ); @@ -280,7 +280,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -318,7 +318,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); 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 ff572cb4e3b..d1e105fd3ac 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 @@ -64,7 +64,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -131,7 +131,7 @@ public interface StoreApi { ) 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 + @NotNull @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 ); 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 90155b42759..bdcc6f788c9 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 @@ -160,7 +160,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -195,7 +195,7 @@ public interface UserApi { ) 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -293,7 +293,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java index a1498fa56d7..53fec358267 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java @@ -97,7 +97,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ); @@ -210,7 +210,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ); @@ -290,7 +290,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -330,7 +330,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java index 08ae5886f72..fc4226b4ef6 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java @@ -53,7 +53,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId ); @@ -118,7 +118,7 @@ public interface StoreApi { ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId ); diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java index b989c19ae4d..234d49792c4 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java @@ -149,7 +149,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ); @@ -182,7 +182,7 @@ public interface UserApi { ) ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ); @@ -278,7 +278,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ); diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java index 2a1a8ef41dc..65fd606a7a9 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java @@ -93,7 +93,7 @@ public interface PetController { ) ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ); @@ -210,7 +210,7 @@ public interface PetController { ) ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ); @@ -282,7 +282,7 @@ public interface PetController { ) ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -321,7 +321,7 @@ public interface PetController { ) ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java index 94aef5ec9ed..781856bac56 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java @@ -53,7 +53,7 @@ public interface StoreController { ) ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId ); @@ -118,7 +118,7 @@ public interface StoreController { ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId ); diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java index efab17bf512..20ee1d06772 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java @@ -132,7 +132,7 @@ public interface UserController { ) ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ); @@ -164,7 +164,7 @@ public interface UserController { ) ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ); @@ -276,7 +276,7 @@ public interface UserController { ) ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body ); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index a1498fa56d7..53fec358267 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -97,7 +97,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ); @@ -210,7 +210,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ); @@ -290,7 +290,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -330,7 +330,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 08ae5886f72..fc4226b4ef6 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -53,7 +53,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId ); @@ -118,7 +118,7 @@ public interface StoreApi { ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId ); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index b989c19ae4d..234d49792c4 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -149,7 +149,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ); @@ -182,7 +182,7 @@ public interface UserApi { ) ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ); @@ -278,7 +278,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java index 42b7b39e449..c7cae9b144f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java @@ -63,7 +63,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @RequestHeader(value = "api_key", required = false) Optional apiKey ); @@ -127,7 +127,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @PathVariable("petId") Long petId + @NotNull @PathVariable("petId") Long petId ); @@ -173,7 +173,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @Valid @RequestParam(value = "name", required = false) Optional name, @Valid @RequestParam(value = "status", required = false) Optional status ); @@ -197,7 +197,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @Valid @RequestParam(value = "additionalMetadata", required = false) Optional additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java index d78f60dcdee..910aff3c2f8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java @@ -41,7 +41,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @PathVariable("orderId") String orderId + @NotNull @PathVariable("orderId") String orderId ); @@ -80,7 +80,7 @@ public interface StoreApi { ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId + @NotNull @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java index b917d403395..de2cb44dcf1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java @@ -98,7 +98,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ); @@ -119,7 +119,7 @@ public interface UserApi { ) ResponseEntity getUserByName( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ); @@ -179,7 +179,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @PathVariable("username") String username, + @NotNull @PathVariable("username") String username, @Valid @RequestBody User user ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java index fc5cc1403e1..14c3f99fc61 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java @@ -104,7 +104,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ); @@ -218,7 +218,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -295,7 +295,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -333,7 +333,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java index ddd4591ad95..aede23282e3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -131,7 +131,7 @@ public interface StoreApi { ) 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 + @NotNull @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 ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java index f5665b83a9b..6011f729006 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java @@ -160,7 +160,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -195,7 +195,7 @@ public interface UserApi { ) 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -293,7 +293,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 01106776d56..9e96440693e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -105,7 +105,7 @@ public interface PetApi { ) CompletableFuture> deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ); @@ -219,7 +219,7 @@ public interface PetApi { ) CompletableFuture> getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -296,7 +296,7 @@ public interface PetApi { ) CompletableFuture> updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -334,7 +334,7 @@ public interface PetApi { ) CompletableFuture> uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 51bc6a561ab..4b8e9ae1f70 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -65,7 +65,7 @@ public interface StoreApi { ) CompletableFuture> deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -132,7 +132,7 @@ public interface StoreApi { ) CompletableFuture> 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 + @NotNull @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 ); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index c9b39f4f981..5627707828b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -161,7 +161,7 @@ public interface UserApi { ) CompletableFuture> deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -196,7 +196,7 @@ public interface UserApi { ) CompletableFuture> 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -294,7 +294,7 @@ public interface UserApi { ) CompletableFuture> updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 8cb79456ddc..f377f7f2f02 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -63,7 +63,7 @@ public interface DefaultApi { ) ResponseEntity get( - @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @NotNull @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "X-Order-Date", required = true, defaultValue = "1974-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate, @Parameter(name = "loginDate", description = "A date cookie parameter", in = ParameterIn.COOKIE) @CookieValue(name = "loginDate", required = false, defaultValue = "1975-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate @@ -93,7 +93,7 @@ public interface DefaultApi { ) ResponseEntity updatePetWithForm( - @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "visitDate", description = "Updated last visit timestamp") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index 1865a872638..c1432011ee8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -104,7 +104,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ); @@ -218,7 +218,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -245,7 +245,7 @@ public interface PetApi { ) ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -315,7 +315,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -353,7 +353,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); @@ -391,7 +391,7 @@ public interface PetApi { ) ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index 5b8128983e1..52d4ef3c441 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @NotNull @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ); @@ -131,7 +131,7 @@ public interface StoreApi { ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index 38320c69d52..e7554045809 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -148,7 +148,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -183,7 +183,7 @@ public interface UserApi { ) 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -275,7 +275,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 68c2743b5db..6a2ff706d0f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -96,7 +96,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ); @@ -214,7 +214,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -278,7 +278,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -314,7 +314,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index d720bc7d911..caab6328800 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -131,7 +131,7 @@ public interface StoreApi { ) 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 + @NotNull @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 ); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 18a282603b0..57cc655b894 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -141,7 +141,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -174,7 +174,7 @@ public interface UserApi { ) 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -285,7 +285,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body ); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 9689bc6bf86..f842246ebc8 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -104,7 +104,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ); @@ -218,7 +218,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -295,7 +295,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ); @@ -333,7 +333,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index ff572cb4e3b..d1e105fd3ac 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -131,7 +131,7 @@ public interface StoreApi { ) 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 + @NotNull @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 ); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 7bd22493d7c..b10471bbcb4 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -160,7 +160,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -195,7 +195,7 @@ public interface UserApi { ) 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -293,7 +293,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index 64b22476e36..2cf73441939 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -104,7 +104,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) throws Exception; @@ -218,7 +218,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) throws Exception; @@ -295,7 +295,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) throws Exception; @@ -333,7 +333,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) throws Exception; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index 35b0c7ea57a..8e6e9d7744f 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) throws Exception; @@ -131,7 +131,7 @@ public interface StoreApi { ) 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 + @NotNull @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 ) throws Exception; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java index c30b4a44314..01502f096fa 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java @@ -160,7 +160,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) throws Exception; @@ -195,7 +195,7 @@ public interface UserApi { ) 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) throws Exception; @@ -293,7 +293,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) throws Exception; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 24a9f651982..f60619cc48e 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -125,7 +125,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -276,7 +276,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -387,7 +387,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -428,7 +428,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 7fb402e0d7f..81846320001 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -68,7 +68,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -141,7 +141,7 @@ public interface StoreApi { ) default 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 + @NotNull @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index fb2ec2f5f3e..4025ffb8121 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -211,7 +211,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -332,7 +332,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index e24f17701e3..5c9dc9f6962 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -125,7 +125,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -276,7 +276,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -387,7 +387,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -428,7 +428,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index 26de3454506..192250f4f72 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -68,7 +68,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -141,7 +141,7 @@ public interface StoreApi { ) default 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 + @NotNull @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java index 1f0f5d814fe..ab6b338b74c 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -211,7 +211,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -332,7 +332,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java index 2bf4eb4fbea..e5918f3ca0d 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java @@ -125,7 +125,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -276,7 +276,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -387,7 +387,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -428,7 +428,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java index 9172c8a2ef9..cf959c731ee 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java @@ -68,7 +68,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -141,7 +141,7 @@ public interface StoreApi { ) default 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 + @NotNull @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java index 1bd88183705..e60af0cd612 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -211,7 +211,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -332,7 +332,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 97e6ae21c38..055054abf94 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 @@ -232,7 +232,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { return getDelegate().responseObjectDifferentNames(petId); } @@ -663,7 +663,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index b46e03b51ff..7dab7a8c2c8 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -105,7 +105,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -225,7 +225,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { return getDelegate().getPetById(petId); } @@ -299,7 +299,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -339,7 +339,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index eccef7bb424..27dda64c7b5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @NotNull @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -135,7 +135,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ) { return getDelegate().getOrderById(orderId); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index bc2e5689f5e..32238be567d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -154,7 +154,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return getDelegate().deleteUser(username); } @@ -191,7 +191,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return getDelegate().getUserByName(username); } @@ -289,7 +289,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return getDelegate().updateUser(username, user); 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 19a9771f403..5831b70ee59 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 @@ -250,7 +250,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -720,7 +720,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 98c7f343a2c..43e3dd3ceae 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -112,7 +112,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -262,7 +262,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -352,7 +352,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -393,7 +393,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index ba895284249..476031e0272 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -68,7 +68,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @NotNull @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -141,7 +141,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index d9e2e3ca9e5..15bd90ee09c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -161,7 +161,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -199,7 +199,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -314,7 +314,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java index 56ea3ee423a..12c537a66d7 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java @@ -84,7 +84,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -185,7 +185,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @PathVariable("petId") Long petId + @NotNull @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -265,7 +265,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @Valid @RequestParam(value = "name", required = false) String name, @Valid @RequestParam(value = "status", required = false) String status ) { @@ -292,7 +292,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java index ac501ab912f..5257a0c0703 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java @@ -45,7 +45,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @PathVariable("orderId") String orderId + @NotNull @PathVariable("orderId") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -90,7 +90,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId + @NotNull @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java index 4dae0571d75..94f8c87bb1e 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java @@ -111,7 +111,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -135,7 +135,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -218,7 +218,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @PathVariable("username") String username, + @NotNull @PathVariable("username") String username, @Valid @RequestBody User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 0f97530748e..51d476984e2 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -126,7 +126,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -277,7 +277,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -388,7 +388,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -429,7 +429,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 0333a81b834..05fb0ccbf73 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -69,7 +69,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -142,7 +142,7 @@ public interface StoreApi { ) default 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 + @NotNull @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 195b9a5c84b..f3be080336a 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -174,7 +174,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -212,7 +212,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -333,7 +333,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 ea1b60e999a..c08cac98854 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 @@ -222,7 +222,7 @@ public interface FakeApi { ) ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) throws Exception; @@ -629,7 +629,7 @@ public interface FakeApi { ) ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index 2e4123d26c8..661e6e72946 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -103,7 +103,7 @@ public interface PetApi { ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) throws Exception; @@ -217,7 +217,7 @@ public interface PetApi { ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) throws Exception; @@ -287,7 +287,7 @@ public interface PetApi { ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) throws Exception; @@ -325,7 +325,7 @@ public interface PetApi { ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index eb53493a7ea..1b3d3783956 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @NotNull @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ) throws Exception; @@ -131,7 +131,7 @@ public interface StoreApi { ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java index 2f781f98fa2..e7184a9f88f 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java @@ -148,7 +148,7 @@ public interface UserApi { ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) throws Exception; @@ -183,7 +183,7 @@ public interface UserApi { ) 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) throws Exception; @@ -275,7 +275,7 @@ public interface UserApi { ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) 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 0a7b583453b..105dcf9efa9 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 @@ -240,7 +240,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -715,7 +715,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 2981bcb4824..832fa45f859 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -105,7 +105,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -257,7 +257,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -353,7 +353,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -396,7 +396,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index c865c80cc0a..fac13700117 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -128,7 +128,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index e0f77b56f83..f08c2ab44b0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -150,7 +150,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -186,7 +186,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -299,7 +299,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 0a7b583453b..105dcf9efa9 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 @@ -240,7 +240,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -715,7 +715,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 2981bcb4824..832fa45f859 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -105,7 +105,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -257,7 +257,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -353,7 +353,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -396,7 +396,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index c865c80cc0a..fac13700117 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -128,7 +128,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index e0f77b56f83..f08c2ab44b0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -150,7 +150,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -186,7 +186,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -299,7 +299,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/FakeApi.java index bbb3b69fd58..63ea4f636d1 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -240,7 +240,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -715,7 +715,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/PetApi.java index a7db9663ae4..25296ae743c 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/PetApi.java @@ -105,7 +105,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -257,7 +257,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -353,7 +353,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -396,7 +396,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/StoreApi.java index 3515aeca49e..dcaa5e00949 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -128,7 +128,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/UserApi.java index a411f1872e2..bc102dde116 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/UserApi.java @@ -150,7 +150,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -186,7 +186,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -299,7 +299,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 af933ae60ef..9dd870d0b76 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 @@ -222,7 +222,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { return getDelegate().responseObjectDifferentNames(petId); } @@ -658,7 +658,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 32a51887df1..48073355498 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -100,7 +100,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -221,7 +221,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { return getDelegate().getPetById(petId); } @@ -301,7 +301,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -343,7 +343,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 13007b5d860..0d161add44a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -53,7 +53,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -122,7 +122,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { return getDelegate().getOrderById(orderId); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index fdce4aab907..35563160d7f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -143,7 +143,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return getDelegate().deleteUser(username); } @@ -178,7 +178,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { return getDelegate().getUserByName(username); } @@ -274,7 +274,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ) { return getDelegate().updateUser(username, user); diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java index 885cc06ad20..082b362df3d 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java @@ -101,7 +101,7 @@ public interface PetApi { @ResponseStatus(HttpStatus.BAD_REQUEST) default void deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { getDelegate().deletePet(petId, apiKey); @@ -223,7 +223,7 @@ public interface PetApi { @ResponseStatus(HttpStatus.OK) default Pet getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { return getDelegate().getPetById(petId); } @@ -309,7 +309,7 @@ public interface PetApi { @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) default void updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -352,7 +352,7 @@ public interface PetApi { @ResponseStatus(HttpStatus.OK) default ModelApiResponse uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java index 3f99df318a4..c076077c6cd 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java @@ -54,7 +54,7 @@ public interface StoreApi { @ResponseStatus(HttpStatus.BAD_REQUEST) default void deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId ) { getDelegate().deleteOrder(orderId); } @@ -125,7 +125,7 @@ public interface StoreApi { @ResponseStatus(HttpStatus.OK) default Order getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId ) { return getDelegate().getOrderById(orderId); } diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java index a8a12eaff48..10d20711977 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java @@ -159,7 +159,7 @@ public interface UserApi { @ResponseStatus(HttpStatus.BAD_REQUEST) default void deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { getDelegate().deleteUser(username); } @@ -195,7 +195,7 @@ public interface UserApi { @ResponseStatus(HttpStatus.OK) default User getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { return getDelegate().getUserByName(username); } @@ -300,7 +300,7 @@ public interface UserApi { @ResponseStatus(HttpStatus.BAD_REQUEST) default void updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ) { getDelegate().updateUser(username, user); 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 af933ae60ef..9dd870d0b76 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 @@ -222,7 +222,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { return getDelegate().responseObjectDifferentNames(petId); } @@ -658,7 +658,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 32a51887df1..48073355498 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -100,7 +100,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -221,7 +221,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { return getDelegate().getPetById(petId); } @@ -301,7 +301,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -343,7 +343,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 13007b5d860..0d161add44a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -53,7 +53,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -122,7 +122,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { return getDelegate().getOrderById(orderId); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index fdce4aab907..35563160d7f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -143,7 +143,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return getDelegate().deleteUser(username); } @@ -178,7 +178,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { return getDelegate().getUserByName(username); } @@ -274,7 +274,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ) { return getDelegate().updateUser(username, user); diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java index 2790a9e64ee..039017f13f1 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java @@ -83,7 +83,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @PathVariable("petId") Long petId + @NotNull @PathVariable("petId") Long petId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -183,7 +183,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @PathVariable("petId") Long petId + @NotNull @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -263,7 +263,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @Valid @RequestParam(value = "name", required = false) String name, @Valid @RequestParam(value = "status", required = false) String status ) { @@ -290,7 +290,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java index ac501ab912f..5257a0c0703 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java @@ -45,7 +45,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @PathVariable("orderId") String orderId + @NotNull @PathVariable("orderId") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -90,7 +90,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId + @NotNull @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java index 4dae0571d75..94f8c87bb1e 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java @@ -111,7 +111,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -135,7 +135,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -218,7 +218,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @PathVariable("username") String username, + @NotNull @PathVariable("username") String username, @Valid @RequestBody User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 7857524e5b6..3bd635426e9 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 @@ -240,7 +240,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -715,7 +715,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index c413f2abd1a..78fb687dd26 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -107,7 +107,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -258,7 +258,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -354,7 +354,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -397,7 +397,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index c865c80cc0a..fac13700117 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -128,7 +128,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index e0f77b56f83..f08c2ab44b0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -150,7 +150,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -186,7 +186,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -299,7 +299,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/PetApi.java index e24f17701e3..5c9dc9f6962 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/PetApi.java @@ -125,7 +125,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -276,7 +276,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -387,7 +387,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -428,7 +428,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/StoreApi.java index 26de3454506..192250f4f72 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/StoreApi.java @@ -68,7 +68,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -141,7 +141,7 @@ public interface StoreApi { ) default 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 + @NotNull @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/UserApi.java index 1f0f5d814fe..ab6b338b74c 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -211,7 +211,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -332,7 +332,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/PetApi.java index 2bf4eb4fbea..e5918f3ca0d 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/PetApi.java @@ -125,7 +125,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -276,7 +276,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -387,7 +387,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -428,7 +428,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/StoreApi.java index 9172c8a2ef9..cf959c731ee 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/StoreApi.java @@ -68,7 +68,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -141,7 +141,7 @@ public interface StoreApi { ) default 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 + @NotNull @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/UserApi.java index 1bd88183705..e60af0cd612 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -211,7 +211,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -332,7 +332,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java index 975de4414b7..395ec3006fe 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java @@ -116,7 +116,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -242,7 +242,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { return getDelegate().getPetById(petId); } @@ -323,7 +323,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -363,7 +363,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApi.java index 91069fd9bd0..32507d29cc8 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -135,7 +135,7 @@ public interface StoreApi { ) default 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 + @NotNull @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 ) { return getDelegate().getOrderById(orderId); } diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApi.java index e7873ceeff6..39001ed92e6 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApi.java @@ -166,7 +166,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return getDelegate().deleteUser(username); } @@ -203,7 +203,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return getDelegate().getUserByName(username); } @@ -307,7 +307,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return getDelegate().updateUser(username, user); 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 4bcdb7a4c84..f80fc8ea190 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 @@ -238,7 +238,7 @@ public interface FakeApi { @ResponseStatus(HttpStatus.OK) default Mono responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().responseObjectDifferentNames(petId, exchange); @@ -697,7 +697,7 @@ public interface FakeApi { @ResponseStatus(HttpStatus.OK) default Mono uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Part requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java index a6eb35c4cb4..a70578a111d 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java @@ -108,7 +108,7 @@ public interface PetApi { @ResponseStatus(HttpStatus.OK) default Mono deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey, @ApiIgnore final ServerWebExchange exchange ) { @@ -235,7 +235,7 @@ public interface PetApi { @ResponseStatus(HttpStatus.OK) default Mono getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getPetById(petId, exchange); @@ -319,7 +319,7 @@ public interface PetApi { @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) default Mono updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, @ApiIgnore final ServerWebExchange exchange @@ -363,7 +363,7 @@ public interface PetApi { @ResponseStatus(HttpStatus.OK) default Mono uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) Part file, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java index 7dd82ccaabf..da2a50df137 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java @@ -59,7 +59,7 @@ public interface StoreApi { @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteOrder(orderId, exchange); @@ -131,7 +131,7 @@ public interface StoreApi { @ResponseStatus(HttpStatus.OK) default Mono getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getOrderById(orderId, exchange); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index e3b55b2ae73..996a5cacdd1 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -155,7 +155,7 @@ public interface UserApi { @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteUser(username, exchange); @@ -192,7 +192,7 @@ public interface UserApi { @ResponseStatus(HttpStatus.OK) default Mono getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getUserByName(username, exchange); @@ -293,7 +293,7 @@ public interface UserApi { @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono user, @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 4b7091e2342..f71a0f9a377 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 @@ -232,7 +232,7 @@ public interface FakeApi { ) default Mono> responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().responseObjectDifferentNames(petId, exchange); @@ -679,7 +679,7 @@ public interface FakeApi { ) default Mono> uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Part requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 7fc6bd59987..fd989200ce1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -106,7 +106,7 @@ public interface PetApi { ) default Mono> deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey, @ApiIgnore final ServerWebExchange exchange ) { @@ -230,7 +230,7 @@ public interface PetApi { ) default Mono> getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getPetById(petId, exchange); @@ -312,7 +312,7 @@ public interface PetApi { ) default Mono> updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, @ApiIgnore final ServerWebExchange exchange @@ -355,7 +355,7 @@ public interface PetApi { ) default Mono> uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) Part file, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index b5e7cf4da4f..64a781baed2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -58,7 +58,7 @@ public interface StoreApi { ) default Mono> deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteOrder(orderId, exchange); @@ -128,7 +128,7 @@ public interface StoreApi { ) default Mono> getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getOrderById(orderId, exchange); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 2adbe9dc684..c5e412c318b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -151,7 +151,7 @@ public interface UserApi { ) default Mono> deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteUser(username, exchange); @@ -187,7 +187,7 @@ public interface UserApi { ) default Mono> getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getUserByName(username, exchange); @@ -285,7 +285,7 @@ public interface UserApi { ) default Mono> updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono user, @ApiIgnore final ServerWebExchange exchange ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 6ce1672e526..d59a6d0dd4f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -561,7 +561,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 20cd1b740eb..bf237bc98f9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -99,7 +99,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -224,7 +224,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { return getDelegate().getPetById(petId); } @@ -340,7 +340,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -381,7 +381,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index ef639d87179..270fe5fcc9d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -53,7 +53,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -122,7 +122,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { return getDelegate().getOrderById(orderId); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 3e191520ac5..13b5ad5e8ee 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -138,7 +138,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return getDelegate().deleteUser(username); } @@ -172,7 +172,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { return getDelegate().getUserByName(username); } @@ -265,7 +265,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body ) { return getDelegate().updateUser(username, body); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java index 128a8451080..732bba2536b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java @@ -56,7 +56,7 @@ public interface VersioningApi { default ResponseEntity versioningHeaders( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { return getDelegate().versioningHeaders(versionWithDefaultValue, versionNoDefaultValue, petId); } @@ -96,7 +96,7 @@ public interface VersioningApi { @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValueHeader", required = true, defaultValue = "V1") String versionWithDefaultValueHeader, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValueHeader", required = true) String versionNoDefaultValueHeader, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { return getDelegate().versioningMix(versionWithDefaultValueQuery, versionNoDefaultValueQuery, versionWithDefaultValueHeader, versionNoDefaultValueHeader, petId); } @@ -131,7 +131,7 @@ public interface VersioningApi { default ResponseEntity versioningQueryParams( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { return getDelegate().versioningQueryParams(versionWithDefaultValue, versionNoDefaultValue, petId); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index 6ce1672e526..d59a6d0dd4f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -561,7 +561,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 20cd1b740eb..bf237bc98f9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -99,7 +99,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -224,7 +224,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { return getDelegate().getPetById(petId); } @@ -340,7 +340,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -381,7 +381,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index ef639d87179..270fe5fcc9d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -53,7 +53,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -122,7 +122,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { return getDelegate().getOrderById(orderId); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 3e191520ac5..13b5ad5e8ee 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -138,7 +138,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return getDelegate().deleteUser(username); } @@ -172,7 +172,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { return getDelegate().getUserByName(username); } @@ -265,7 +265,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body ) { return getDelegate().updateUser(username, body); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java index d0dd7792a76..a0f987a8ae7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java @@ -56,7 +56,7 @@ public interface VersioningApi { ) default ResponseEntity versioningHeaders( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { return getDelegate().versioningHeaders(petId); } @@ -96,7 +96,7 @@ public interface VersioningApi { default ResponseEntity versioningMix( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { return getDelegate().versioningMix(versionWithDefaultValueQuery, versionNoDefaultValueQuery, petId); } @@ -131,7 +131,7 @@ public interface VersioningApi { default ResponseEntity versioningQueryParams( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { return getDelegate().versioningQueryParams(versionWithDefaultValue, versionNoDefaultValue, petId); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index ff58693223a..f78ba496433 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -597,7 +597,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 7eb05eb5f1a..fddb29e1f23 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -104,7 +104,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -260,7 +260,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -407,7 +407,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -449,7 +449,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index 7b2e0ecb4a7..c9b530dacb7 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -128,7 +128,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index aa92eaa36a2..0167182e78b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -145,7 +145,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -180,7 +180,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -290,7 +290,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java index 284a85f7995..d773ae1f7ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java @@ -60,7 +60,7 @@ public interface VersioningApi { default ResponseEntity versioningHeaders( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -110,7 +110,7 @@ public interface VersioningApi { @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValueHeader", required = true, defaultValue = "V1") String versionWithDefaultValueHeader, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValueHeader", required = true) String versionNoDefaultValueHeader, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -155,7 +155,7 @@ public interface VersioningApi { default ResponseEntity versioningQueryParams( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index ff58693223a..f78ba496433 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -597,7 +597,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 7eb05eb5f1a..fddb29e1f23 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -104,7 +104,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -260,7 +260,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -407,7 +407,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -449,7 +449,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 7b2e0ecb4a7..c9b530dacb7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -128,7 +128,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index aa92eaa36a2..0167182e78b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -145,7 +145,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -180,7 +180,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -290,7 +290,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java index 08a449ca64f..6a51bef3280 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java @@ -60,7 +60,7 @@ public interface VersioningApi { ) default ResponseEntity versioningHeaders( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -110,7 +110,7 @@ public interface VersioningApi { default ResponseEntity versioningMix( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -155,7 +155,7 @@ public interface VersioningApi { default ResponseEntity versioningQueryParams( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { 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 4c0f3ac165d..1540b344a18 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 @@ -240,7 +240,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -715,7 +715,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) Optional additionalMetadata ) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index cc2a443a505..e12225a5f9f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -105,7 +105,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -257,7 +257,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -353,7 +353,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) Optional name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) Optional status ) { @@ -396,7 +396,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) Optional additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index c865c80cc0a..fac13700117 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -128,7 +128,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index e0f77b56f83..f08c2ab44b0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -150,7 +150,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -186,7 +186,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -299,7 +299,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 ba1f851d040..0892069aefd 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 @@ -259,7 +259,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -741,7 +741,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index 6587d0d0e39..d6d4a358e95 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -115,7 +115,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -269,7 +269,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @NotNull @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -361,7 +361,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -403,7 +403,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @NotNull @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, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index fbfe9a4351f..4658bb906f1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -72,7 +72,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @NotNull @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -147,7 +147,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index b4b00a0be5f..6d766c495be 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -168,7 +168,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -207,7 +207,7 @@ public interface UserApi { ) default 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 + @NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -325,7 +325,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @NotNull @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 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 0f9d56429fd..c0830750869 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 @@ -240,7 +240,7 @@ public interface FakeApi { ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -715,7 +715,7 @@ public interface FakeApi { ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 47d1a1e9887..c7653626b57 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -105,7 +105,7 @@ public interface PetApi { ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -257,7 +257,7 @@ public interface PetApi { ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -353,7 +353,7 @@ public interface PetApi { ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -396,7 +396,7 @@ public interface PetApi { ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index bd9631fbbbb..4146d3429db 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ public interface StoreApi { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -128,7 +128,7 @@ public interface StoreApi { ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 346c34d59ae..7dba4fe164c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -150,7 +150,7 @@ public interface UserApi { ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -186,7 +186,7 @@ public interface UserApi { ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -299,7 +299,7 @@ public interface UserApi { ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody UserDto userDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);