summaryrefslogtreecommitdiffstats
path: root/feature-healthcheck/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-09-13 17:31:46 -0400
committerJim Hahn <jrh3@att.com>2019-09-16 18:24:42 -0400
commit50cd3fbf4561fe445751d299c53efc499df6dfb6 (patch)
tree28d10581129d3b5107693d7183bd2f46af419377 /feature-healthcheck/src/test/java
parent89a8e32aabc34432b3d614f452e10f7125b478ce (diff)
Add YAML support to drools-pdp rest servlets
Drools-pdp depends on some of the GsonJackson annotations that cannot be easily worked around via standard gson. Consequently, this continues to use the JacksonHandler for json-encoding, thus it uses the YamlJacksonHandler for yaml-encoding. Added YAML to swagger "consumes" list. Change-Id: Ic70c68bb274222db571b3515cbf1ab22d9ff2366 Issue-ID: POLICY-2081 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-healthcheck/src/test/java')
-rw-r--r--feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java
index 8bdad5b6..8cbe1fbf 100644
--- a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java
+++ b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,14 +26,15 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
+import org.onap.policy.common.endpoints.http.server.YamlMessageBodyHandler;
@Path("/")
public class RestMockHealthCheck {
-
+
@GET
@Path("healthcheck/test")
- @Produces(MediaType.APPLICATION_JSON)
- public Response papHealthCheck() {
+ @Produces({MediaType.APPLICATION_JSON, YamlMessageBodyHandler.APPLICATION_YAML})
+ public Response papHealthCheck() {
return Response.status(Status.OK).entity("All Alive").build();
}