-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add swagger to authentication server
- Loading branch information
1 parent
cbe5cd8
commit 2bb63eb
Showing
6 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
library-api-authentication-server/src/main/java/dev/earlspilner/auth/dto/AuthDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
package dev.earlspilner.auth.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
/** | ||
* @author Alexander Dudkin | ||
*/ | ||
@Schema(description = "Authentication request data") | ||
public record AuthDto( | ||
@NotNull | ||
@Schema(description = "User's username", example = "thisdudkin", requiredMode = Schema.RequiredMode.REQUIRED) | ||
String username, | ||
|
||
@NotNull | ||
@Schema(description = "User's password", example = "password", requiredMode = Schema.RequiredMode.REQUIRED) | ||
String password | ||
) { } |
11 changes: 9 additions & 2 deletions
11
library-api-authentication-server/src/main/java/dev/earlspilner/auth/dto/Tokens.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
package dev.earlspilner.auth.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
/** | ||
* @author Alexander Dudkin | ||
*/ | ||
@Schema(description = "Access and refresh tokens") | ||
public record Tokens( | ||
@NotNull String accessToken, | ||
@NotNull String refreshToken | ||
@NotNull | ||
@Schema(description = "Access token", example = "eyJhbGciOiJIUzI1...", requiredMode = Schema.RequiredMode.REQUIRED) | ||
String accessToken, | ||
|
||
@NotNull | ||
@Schema(description = "Refresh token", example = "dXNlci1yZWZyZXNoLXRva2Vu..", requiredMode = Schema.RequiredMode.REQUIRED) | ||
String refreshToken | ||
) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters