From 0b47807912254d569728a39f6c00063a381b28eb Mon Sep 17 00:00:00 2001 From: Oleh Kurpiak Date: Sat, 7 Jan 2023 09:24:07 +0200 Subject: [PATCH] [Java][Spring] fix default response code --- .../src/main/resources/JavaSpring/api.mustache | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++---- .../java/org/openapitools/virtualan/api/UserApi.java | 8 ++++---- 18 files changed, 70 insertions(+), 70 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 18886b3d1cd7..4908b7bd750a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -150,7 +150,7 @@ public interface {{classname}} { {{/vendorExtensions.x-tags.size}} responses = { {{#responses}} - @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = { + @ApiResponse(responseCode = {{#isDefault}}"default"{{/isDefault}}{{^isDefault}}"{{{code}}}"{{/isDefault}}, description = "{{{message}}}"{{#baseType}}, content = { {{#produces}} @Content(mediaType = "{{{mediaType}}}", {{#isArray}}array = @ArraySchema({{/isArray}}schema = @Schema(implementation = {{{baseType}}}.class){{#isArray}}){{/isArray}}){{^-last}},{{/-last}} {{/produces}} 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 c43ad49af790..e94ab69cdc0a 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 @@ -51,7 +51,7 @@ public interface UserApi { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -80,7 +80,7 @@ ResponseEntity createUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -109,7 +109,7 @@ ResponseEntity createUsersWithArrayInput( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -233,7 +233,7 @@ ResponseEntity loginUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") 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 41d3cac1b4a2..3f2810f60753 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 @@ -52,7 +52,7 @@ public interface UserApi { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -75,7 +75,7 @@ CompletableFuture> createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -98,7 +98,7 @@ CompletableFuture> createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -209,7 +209,7 @@ CompletableFuture> loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( 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 3b2da4c60cfd..9644f30c9848 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 @@ -51,7 +51,7 @@ public interface UserApi { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -74,7 +74,7 @@ ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -97,7 +97,7 @@ ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -208,7 +208,7 @@ ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( 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 1ee849064eb0..ed07e1c86c9b 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 @@ -51,7 +51,7 @@ public interface UserApi { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -74,7 +74,7 @@ ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -97,7 +97,7 @@ ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -208,7 +208,7 @@ ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -230,7 +230,7 @@ ResponseEntity logoutUser( summary = "logoutUserOptions", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "endpoint configuration response") + @ApiResponse(responseCode = "default", description = "endpoint configuration response") } ) @RequestMapping( 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 7db24e38ea35..33dbdd65306c 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 @@ -51,7 +51,7 @@ public interface UserApi { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -80,7 +80,7 @@ ResponseEntity createUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -109,7 +109,7 @@ ResponseEntity createUsersWithArrayInput( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -233,7 +233,7 @@ ResponseEntity loginUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") 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 c2fd64613ddf..d81c68358777 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 @@ -51,7 +51,7 @@ public interface UserApi { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -74,7 +74,7 @@ ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -97,7 +97,7 @@ ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -208,7 +208,7 @@ ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( 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 c3e72f2a2fb2..486eb36fea0b 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 @@ -55,7 +55,7 @@ default Optional getRequest() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -81,7 +81,7 @@ default ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -107,7 +107,7 @@ default ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -244,7 +244,7 @@ default ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( 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 c9f27c7eada0..4b65c2de7b2a 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 @@ -55,7 +55,7 @@ default Optional getRequest() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -87,7 +87,7 @@ default ResponseEntity createUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -119,7 +119,7 @@ default ResponseEntity createUsersWithArrayInput( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -269,7 +269,7 @@ default ResponseEntity loginUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") 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 b16023157df8..700ddc7f5348 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 @@ -55,7 +55,7 @@ default Optional getRequest() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -87,7 +87,7 @@ default ResponseEntity createUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -119,7 +119,7 @@ default ResponseEntity createUsersWithArrayInput( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -269,7 +269,7 @@ default ResponseEntity loginUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 59134bc852f2..b1713bff5277 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default Optional getRequest() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -81,7 +81,7 @@ default ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -107,7 +107,7 @@ default ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -244,7 +244,7 @@ default ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( 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 30b688c810ff..6102ea513244 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 @@ -51,7 +51,7 @@ default UserApiDelegate getDelegate() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -76,7 +76,7 @@ default ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -101,7 +101,7 @@ default ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -220,7 +220,7 @@ default ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( 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 59134bc852f2..b1713bff5277 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 @@ -55,7 +55,7 @@ default Optional getRequest() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -81,7 +81,7 @@ default ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -107,7 +107,7 @@ default ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -244,7 +244,7 @@ default ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 6b6471732c23..8e098c8b96cb 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default UserApiDelegate getDelegate() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -81,7 +81,7 @@ default Mono> createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -107,7 +107,7 @@ default Mono> createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -230,7 +230,7 @@ default Mono> loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 59134bc852f2..b1713bff5277 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default Optional getRequest() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -81,7 +81,7 @@ default ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -107,7 +107,7 @@ default ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -244,7 +244,7 @@ default ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( 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 d3a91bc74bdc..6c94978d4302 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 @@ -56,7 +56,7 @@ default Optional getRequest() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -88,7 +88,7 @@ default ResponseEntity createUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -120,7 +120,7 @@ default ResponseEntity createUsersWithArrayInput( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") @@ -270,7 +270,7 @@ default ResponseEntity loginUser( description = "", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") }, security = { @SecurityRequirement(name = "api_key") 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 8cefda91a097..b809ffb19e12 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 @@ -51,7 +51,7 @@ public interface UserApi { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -74,7 +74,7 @@ ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -97,7 +97,7 @@ ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -208,7 +208,7 @@ ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( 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 77348a845f23..9074f3871c13 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 @@ -59,7 +59,7 @@ default Optional getRequest() { description = "This can only be done by the logged in user.", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -86,7 +86,7 @@ default ResponseEntity createUser( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -113,7 +113,7 @@ default ResponseEntity createUsersWithArrayInput( summary = "Creates list of users with given input array", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping( @@ -254,7 +254,7 @@ default ResponseEntity loginUser( summary = "Logs out current logged in user session", tags = { "user" }, responses = { - @ApiResponse(responseCode = "200", description = "successful operation") + @ApiResponse(responseCode = "default", description = "successful operation") } ) @RequestMapping(