From 1df1c6aeb21b50ab5c4f7c4a7e6da7bc8abed62e Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 12 Sep 2019 16:05:18 -0400 Subject: Add yaml support to xacml-pdp rest server Also modified code to use StandardYamlCoder. Change-Id: I0596c8b054339ac68ef8c4250cd25b9ff88d47e4 Issue-ID: POLICY-2085 Signed-off-by: Jim Hahn --- .../java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main/src') diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java index 265dd686..3de830e3 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java @@ -62,14 +62,15 @@ import org.onap.policy.pdpx.main.rest.provider.StatisticsProvider; */ @Path("/policy/pdpx/v1") @Api -@Produces(MediaType.APPLICATION_JSON) -@Consumes(MediaType.APPLICATION_JSON) +@Produces({MediaType.APPLICATION_JSON, XacmlPdpRestController.APPLICATION_YAML}) +@Consumes({MediaType.APPLICATION_JSON, XacmlPdpRestController.APPLICATION_YAML}) @SwaggerDefinition(info = @Info(description = "Policy Xacml PDP Service", version = "1.0.0", title = "Policy Xacml PDP", extensions = {@Extension(properties = {@ExtensionProperty(name = "planned-retirement-date", value = "tbd"), @ExtensionProperty(name = "component", value = "Policy Framework")})}), schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS}, securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")})) public class XacmlPdpRestController { + public static final String APPLICATION_YAML = "application/yaml"; @GET @Path("/healthcheck") -- cgit 1.2.3-korg