-
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.
- Loading branch information
1 parent
d1ea6e2
commit 855d2d0
Showing
24 changed files
with
424 additions
and
109 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
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
20 changes: 0 additions & 20 deletions
20
backend-spring-boot/src/main/java/no/vicx/backend/StartupLogger.java
This file was deleted.
Oops, something went wrong.
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
21 changes: 21 additions & 0 deletions
21
backend-spring-boot/src/main/java/no/vicx/backend/calculator/vm/CalcVm.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
21 changes: 20 additions & 1 deletion
21
backend-spring-boot/src/main/java/no/vicx/backend/calculator/vm/CalculatorRequestVm.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,10 +1,29 @@ | ||
package no.vicx.backend.calculator.vm; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import no.vicx.database.calculator.CalculatorOperation; | ||
|
||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; | ||
|
||
/** | ||
* A request object representing a calculator operation with two values and an operator. | ||
*/ | ||
@Schema(description = "Represents a request for a calculator operation.") | ||
public record CalculatorRequestVm( | ||
@Schema(description = "The first value in the calculation.", | ||
example = "10", | ||
requiredMode = REQUIRED) | ||
@NotNull Long firstValue, | ||
|
||
@Schema(description = "The second value in the calculation.", | ||
example = "5", | ||
requiredMode = REQUIRED) | ||
@NotNull Long secondValue, | ||
@NotNull CalculatorOperation operation) { | ||
|
||
@Schema(description = "The operation to perform on the values (e.g., ADD, SUBTRACT).", | ||
implementation = CalculatorOperation.class, | ||
requiredMode = REQUIRED) | ||
@NotNull CalculatorOperation operation | ||
) { | ||
} |
23 changes: 23 additions & 0 deletions
23
backend-spring-boot/src/main/java/no/vicx/backend/config/OpenApiConfig.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package no.vicx.backend.config; | ||
|
||
import io.swagger.v3.oas.annotations.OpenAPIDefinition; | ||
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; | ||
import io.swagger.v3.oas.annotations.info.Info; | ||
import io.swagger.v3.oas.annotations.security.OAuthFlow; | ||
import io.swagger.v3.oas.annotations.security.OAuthFlows; | ||
import io.swagger.v3.oas.annotations.security.OAuthScope; | ||
import io.swagger.v3.oas.annotations.security.SecurityScheme; | ||
|
||
@OpenAPIDefinition(info = @Info(title = "Vicx API", | ||
description = "The Vicx API provides endpoints for managing resources, performing operations, " + | ||
"and accessing features of the Vicx platform.", | ||
version = "v1")) | ||
@SecurityScheme( | ||
name = "security_auth", | ||
type = SecuritySchemeType.OAUTH2, | ||
flows = @OAuthFlows(authorizationCode = @OAuthFlow( | ||
authorizationUrl = "${springdoc.oAuthFlow.authorizationUrl}", | ||
tokenUrl = "${springdoc.oAuthFlow.tokenUrl}", | ||
scopes = {@OAuthScope(name = "openid", description = "openid scope")}))) | ||
public class OpenApiConfig { | ||
} |
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
24 changes: 0 additions & 24 deletions
24
backend-spring-boot/src/main/java/no/vicx/backend/config/WebConfig.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.