aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java')
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java40
1 files changed, 6 insertions, 34 deletions
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
index 1573f1df3..0dc401fe8 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,43 +20,20 @@
package org.onap.policy.apex.services.onappf.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import io.swagger.annotations.Authorization;
-import io.swagger.annotations.BasicAuthDefinition;
-import io.swagger.annotations.Info;
-import io.swagger.annotations.SecurityDefinition;
-import io.swagger.annotations.SwaggerDefinition;
-import io.swagger.annotations.Tag;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
import java.net.HttpURLConnection;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
/**
* Class to provide REST endpoints for services-onappf component health check.
*
* @author Ajith Sreekumar (ajith.sreekumar@est.tech)
*/
-//@formatter:off
@Path("/policy/apex-pdp/v1")
-@Api(value = "PDP-A API")
@Produces(MediaType.APPLICATION_JSON)
-@SwaggerDefinition(
- info = @Info(description =
- "PDP-A is responsible for making policy decisions and for managing the administrative"
- + " state of the PDPs as directed by PolicyAdministration", version = "v1.0",
- title = "PDP-A"),
- consumes = {MediaType.APPLICATION_JSON},
- produces = {MediaType.APPLICATION_JSON},
- schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},
- tags = {@Tag(name = "PDP-A", description = "PDP-A Operations")},
- securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")}))
//@formatter:on
public class HealthCheckRestControllerV1 {
@@ -72,11 +49,6 @@ public class HealthCheckRestControllerV1 {
@GET
@Path("healthcheck")
- @ApiOperation(value = "Perform healthcheck", notes = "Returns healthy status of the PDP-A component",
- response = HealthCheckReport.class, authorizations = @Authorization(value = AUTHORIZATION_TYPE))
- @ApiResponses(value = { @ApiResponse(code = AUTHENTICATION_ERROR_CODE, message = AUTHENTICATION_ERROR_MESSAGE),
- @ApiResponse(code = AUTHORIZATION_ERROR_CODE, message = AUTHORIZATION_ERROR_MESSAGE),
- @ApiResponse(code = SERVER_ERROR_CODE, message = SERVER_ERROR_MESSAGE) })
public Response healthcheck() {
return Response.status(Response.Status.OK).entity(new HealthCheckProvider().performHealthCheck()).build();
}