Report bad-request for invalid YAML 23/95623/2
authorJim Hahn <jrh3@att.com>
Thu, 12 Sep 2019 21:29:49 +0000 (17:29 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 12 Sep 2019 22:06:10 +0000 (18:06 -0400)
commit3075051aa8ae9a2af4267148da5221687c6da9ba
tree1f4cfe861f508aa84dd7476da9da520ddd91930d
parent173c4dbea9a1175a6f18031a221bb701deeecaa7
Report bad-request for invalid YAML

Added classes and modified code to report bad-request when a servlet
attempts to read invalid YAML.

Change-Id: Iacddee92a448fb69d5c778a3c3f3f2b5528983f7
Issue-ID: POLICY-2085
Signed-off-by: Jim Hahn <jrh3@att.com>
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/JsonExceptionMapper.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/RestServer.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/YamlExceptionMapper.java [new file with mode: 0644]
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/YamlMessageBodyHandler.java
policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/JsonExceptionMapperTest.java
policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestServerTest.java
policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlExceptionMapperTest.java [new file with mode: 0644]
policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java