From f2e889ea49614d2a08fc9d2463a0976ec62dcbbf Mon Sep 17 00:00:00 2001 From: Thomas Enderle Date: Sat, 21 Mar 2020 22:37:22 +0100 Subject: [PATCH 1/2] fix issue #5658 --- .../resteasy/eap/beanValidation.mustache | 51 +------------------ .../resteasy/eap/beanValidationCore.mustache | 20 ++++++++ .../eap/beanValidationHeaderParams.mustache | 2 +- .../eap/beanValidationPathParams.mustache | 2 +- .../eap/beanValidationQueryParams.mustache | 2 +- 5 files changed, 24 insertions(+), 53 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationCore.mustache diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidation.mustache index 16573060a9d7..c8c6946fef66 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidation.mustache @@ -1,53 +1,4 @@ {{#required}} @NotNull {{/required}} -{{#pattern}} - @Pattern(regexp="{{{pattern}}}") -{{/pattern}} -{{#minLength}} -{{#maxLength}} - @Size(min={{minLength}},max={{maxLength}}) -{{/maxLength}} -{{/minLength}} -{{#minLength}} -{{^maxLength}} - @Size(min={{minLength}}) -{{/maxLength}} -{{/minLength}} -{{^minLength}} -{{#maxLength}} - @Size(max={{maxLength}}) - {{/maxLength}} - {{/minLength}} -{{#minItems}} -{{#maxItems}} - @Size(min={{minItems}},max={{maxItems}}) -{{/maxItems}} -{{/minItems}} -{{#minItems}} -{{^maxItems}} - @Size(min={{minItems}}) -{{/maxItems}} -{{/minItems}} -{{^minItems}} -{{#maxItems}} - @Size(max={{maxItems}}) -{{/maxItems}} -{{/minItems}} -{{! check for integer / number=decimal type}} -{{#isInteger}} -{{#minimum}} - @Min({{minimum}}) -{{/minimum}} -{{#maximum}} - @Max({{maximum}}) -{{/maximum}} -{{/isInteger}} -{{^isInteger}} -{{#minimum}} - @DecimalMin("{{minimum}}") -{{/minimum}} -{{#maximum}} - @DecimalMax("{{maximum}}") -{{/maximum}} -{{/isInteger}} \ No newline at end of file +{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationCore.mustache new file mode 100644 index 000000000000..d107c037b9a7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationCore.mustache @@ -0,0 +1,20 @@ +{{#pattern}} @Pattern(regexp="{{{pattern}}}"){{/pattern}}{{! +minLength && maxLength set +}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +minLength set, maxLength not +}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! +minLength not set, maxLength set +}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +@Size: minItems && maxItems set +}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +@Size: minItems set, maxItems not +}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! +@Size: minItems not set && maxItems set +}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +check for integer or long / all others=decimal type with @Decimal* +isInteger set +}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +isLong set +}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +Not Integer, not Long => we have a decimal value! +}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{maximum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationHeaderParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationHeaderParams.mustache index 4bad1be63686..f8eef8f94c7b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationHeaderParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationHeaderParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{#pattern}} @Pattern(regexp="{{{pattern}}}"){{/pattern}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationPathParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationPathParams.mustache index 0b4d31b4bf10..051bd53c0a58 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationPathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationPathParams.mustache @@ -1 +1 @@ -{{! PathParam is always required, no @NotNull necessary }}{{#pattern}} @Pattern(regexp="{{{pattern}}}"){{/pattern}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}} \ No newline at end of file +{{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationQueryParams.mustache index 4bad1be63686..f8eef8f94c7b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{#pattern}} @Pattern(regexp="{{{pattern}}}"){{/pattern}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file From 7e334af932e0d5cb4c9c4433bf30f6b9f90a73a0 Mon Sep 17 00:00:00 2001 From: Thomas Enderle Date: Sat, 21 Mar 2020 22:50:45 +0100 Subject: [PATCH 2/2] update samples --- .../eap-java8/src/gen/java/org/openapitools/api/PetApi.java | 6 +++--- .../src/gen/java/org/openapitools/api/StoreApi.java | 2 +- .../src/gen/java/org/openapitools/api/UserApi.java | 2 +- .../eap-joda/src/gen/java/org/openapitools/api/PetApi.java | 6 +++--- .../src/gen/java/org/openapitools/api/StoreApi.java | 2 +- .../eap-joda/src/gen/java/org/openapitools/api/UserApi.java | 2 +- .../eap/src/gen/java/org/openapitools/api/PetApi.java | 6 +++--- .../eap/src/gen/java/org/openapitools/api/StoreApi.java | 2 +- .../eap/src/gen/java/org/openapitools/api/UserApi.java | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java index 027ec533ae92..e14815f49021 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java @@ -54,7 +54,7 @@ public interface PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); @GET @Path("/findByStatus") @@ -69,7 +69,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List status,@Context SecurityContext securityContext); + public Response findPetsByStatus( @NotNull @QueryParam("status") List status,@Context SecurityContext securityContext); @GET @Path("/findByTags") @@ -84,7 +84,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List tags,@Context SecurityContext securityContext); + public Response findPetsByTags( @NotNull @QueryParam("tags") List tags,@Context SecurityContext securityContext); @GET @Path("/{petId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java index 73f3a693d5e9..868c02a694b3 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java @@ -58,7 +58,7 @@ public interface StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); + public Response getOrderById( @Min(1L) @Max(5L) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); @POST @Path("/order") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java index 4ca54bbd29e6..addd48d94062 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java @@ -82,7 +82,7 @@ public interface UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); @GET @Path("/logout") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/PetApi.java index 027ec533ae92..e14815f49021 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/PetApi.java @@ -54,7 +54,7 @@ public interface PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); @GET @Path("/findByStatus") @@ -69,7 +69,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List status,@Context SecurityContext securityContext); + public Response findPetsByStatus( @NotNull @QueryParam("status") List status,@Context SecurityContext securityContext); @GET @Path("/findByTags") @@ -84,7 +84,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List tags,@Context SecurityContext securityContext); + public Response findPetsByTags( @NotNull @QueryParam("tags") List tags,@Context SecurityContext securityContext); @GET @Path("/{petId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java index 73f3a693d5e9..868c02a694b3 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java @@ -58,7 +58,7 @@ public interface StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); + public Response getOrderById( @Min(1L) @Max(5L) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); @POST @Path("/order") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java index 4ca54bbd29e6..addd48d94062 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java @@ -82,7 +82,7 @@ public interface UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); @GET @Path("/logout") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/PetApi.java index 027ec533ae92..e14815f49021 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/PetApi.java @@ -54,7 +54,7 @@ public interface PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); @GET @Path("/findByStatus") @@ -69,7 +69,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List status,@Context SecurityContext securityContext); + public Response findPetsByStatus( @NotNull @QueryParam("status") List status,@Context SecurityContext securityContext); @GET @Path("/findByTags") @@ -84,7 +84,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List tags,@Context SecurityContext securityContext); + public Response findPetsByTags( @NotNull @QueryParam("tags") List tags,@Context SecurityContext securityContext); @GET @Path("/{petId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java index 73f3a693d5e9..868c02a694b3 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java @@ -58,7 +58,7 @@ public interface StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); + public Response getOrderById( @Min(1L) @Max(5L) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); @POST @Path("/order") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java index 4ca54bbd29e6..addd48d94062 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java @@ -82,7 +82,7 @@ public interface UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); @GET @Path("/logout")