feat: add logout operation description and update schema annotations in LoginRequest
This commit is contained in:
@@ -45,6 +45,7 @@ public class AuthController {
|
||||
.body(UserResponse.from(user));
|
||||
}
|
||||
|
||||
@Operation(description = "退出登录")
|
||||
@PostMapping("/logout")
|
||||
public ResponseEntity<Void> logout() {
|
||||
var expiredCookie = cookieService.buildCookie(CookieName.ACCESS_TOKEN, "", Duration.ZERO);
|
||||
|
||||
@@ -6,10 +6,10 @@ import jakarta.validation.constraints.NotBlank;
|
||||
@Schema(description = "登录请求")
|
||||
public record LoginRequest(
|
||||
@NotBlank(message = "登录名称不能为空")
|
||||
@Schema(description = "用户名或电子邮箱")
|
||||
@Schema(description = "用户名或电子邮箱", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
String principle,
|
||||
@NotBlank(message = "登录口令不能为空")
|
||||
@Schema(description = "密码")
|
||||
@Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
String credential
|
||||
) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user