All checks were successful
Quality Check / Validate OAS (push) Successful in 38s
Build Application / build (push) Successful in 1m12s
Build Application / build-docker (push) Successful in 14s
Build Application / release (push) Successful in 8s
Quality Check / Testing (push) Successful in 48s
Quality Check / Linting (push) Successful in 57s
Quality Check / Static Analysis (push) Successful in 1m5s
32 lines
976 B
Java
32 lines
976 B
Java
package de.towerdefence.server.server;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import de.towerdefence.server.oas.ServerApi;
|
|
import de.towerdefence.server.oas.models.ServerHealth;
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import java.util.Optional;
|
|
|
|
@Controller
|
|
@RequestMapping("${openapi.api.base-path:/api/v1}")
|
|
public class ServerApiController implements ServerApi {
|
|
@Override
|
|
public Optional<ObjectMapper> getObjectMapper() {
|
|
return Optional.empty();
|
|
}
|
|
|
|
@Override
|
|
public Optional<HttpServletRequest> getRequest() {
|
|
return Optional.empty();
|
|
}
|
|
|
|
@Override
|
|
public ResponseEntity<ServerHealth> serverGetHealthcheck() {
|
|
ServerHealth health = new ServerHealth();
|
|
health.setOkay(true);
|
|
return ResponseEntity.ok(health);
|
|
}
|
|
}
|