summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-09-12 16:05:18 -0400
committerJim Hahn <jrh3@att.com>2019-09-12 16:20:30 -0400
commit1df1c6aeb21b50ab5c4f7c4a7e6da7bc8abed62e (patch)
treed17b9209b4f26ba6f3a04600b514e90bbdd4cbb8 /main
parent88a247ef93ac0f0e2ff00345e0408a2af232b3c9 (diff)
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 <jrh3@att.com>
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java5
1 files changed, 3 insertions, 2 deletions
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")