aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers/SignUp.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-01-13 17:38:06 +0300
committerGravatar Vitaly Takmazov2023-01-13 18:11:56 +0300
commit35d25bbc9d261e7b5585d0fd1d398dff3ab4a176 (patch)
tree68a4d0b0190635615438343f6f6c52cacc213179 /src/main/java/com/juick/www/controllers/SignUp.java
parent8b70eded6c9cc3b9cf634356239701fe65779791 (diff)
Fix OpenAPI generation
* Use HandlerMethodArgumentResolver to pass visitor * Hide visitor from OpenAPI definitions * Drop unused AsciiDoc template
Diffstat (limited to 'src/main/java/com/juick/www/controllers/SignUp.java')
-rw-r--r--src/main/java/com/juick/www/controllers/SignUp.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/juick/www/controllers/SignUp.java b/src/main/java/com/juick/www/controllers/SignUp.java
index b746c09b..87182ebd 100644
--- a/src/main/java/com/juick/www/controllers/SignUp.java
+++ b/src/main/java/com/juick/www/controllers/SignUp.java
@@ -24,6 +24,7 @@ import com.juick.www.WebApp;
import com.juick.service.EmailService;
import com.juick.service.UserService;
import com.juick.service.security.entities.JuickUser;
+import io.swagger.v3.oas.annotations.Parameter;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.security.authentication.RememberMeAuthenticationToken;
@@ -58,7 +59,7 @@ public class SignUp {
@GetMapping("/signup")
protected String doGet(
- @ModelAttribute User visitor,
+ @Parameter(hidden = true) User visitor,
@RequestParam String type, @RequestParam String hash, ModelMap model) {
if (hash.length() > 36 || !type.matches("^[a-zA-Z0-9\\-]+$")
|| !hash.matches("^[a-zA-Z0-9\\-]+$")) {
@@ -99,7 +100,7 @@ public class SignUp {
protected String doPost(
HttpServletRequest request,
HttpServletResponse response,
- @ModelAttribute User visitor,
+ @Parameter(hidden = true) User visitor,
@RequestParam String type,
@RequestParam String hash,
@RequestParam String action,