aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src/main/java/org/onap
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-08-10 16:58:48 +0100
committeradheli.tavares <adheli.tavares@est.tech>2023-09-22 16:01:00 +0100
commita3a032d5b902c3e125dccd2bc2b41f22861decc1 (patch)
tree481b0faa916f39da096fe5c935c630b1598f0f7d /services/services-onappf/src/main/java/org/onap
parent097618956f681eee12a23d7d9dc4f4f22f5347cc (diff)
Java 17 Upgrade
Updated dependencies to latest versions Made Java 17 changes Moved apex dependencies versions to main apex pom Issue-ID: POLICY-4675 Change-Id: Ia5cd5670a1f024f5402cbd7371162ce3313930ef Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'services/services-onappf/src/main/java/org/onap')
-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();
}