Fix swagger and improve exception handling 96/127096/5
authora.sreekumar <ajith.sreekumar@bell.ca>
Mon, 14 Feb 2022 11:11:11 +0000 (11:11 +0000)
committera.sreekumar <ajith.sreekumar@bell.ca>
Tue, 1 Mar 2022 11:05:24 +0000 (11:05 +0000)
commit411a7aa191a48170336dfa0fc5c44a17f99fd186
treed2ffd185a75768b1ef5f2b2cda0e58015a76053c
parent98aed0d3f60be26df2cc0dc86d368a615df59978
Fix swagger and improve exception handling

1) Swagger was getting generated in a different format
due to a serialization isue. It is fixed.
2) Improved exception handling by taking care of any exceptions
that could occur in and around database operations.
3) AAF enabling/disabling was done using spring profiles.
This is changed to using parameters, as it is more easier to configure
in an OOM helm chart deployment

Change-Id: If1bee01379ba5c4efac29822662896d8aa883fc8
Issue-ID: POLICY-3975
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
main/src/main/java/org/onap/policy/pap/main/PolicyPapApplication.java
main/src/main/java/org/onap/policy/pap/main/config/PapAafConfig.java
main/src/main/java/org/onap/policy/pap/main/exception/ControllerExceptionHandler.java [moved from main/src/main/java/org/onap/policy/pap/main/PapExceptionHandler.java with 96% similarity]
main/src/main/java/org/onap/policy/pap/main/exception/ServiceExceptionHandler.java [new file with mode: 0644]
main/src/main/resources/application.yaml
main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java
main/src/test/resources/config/application.yaml
packages/policy-pap-tarball/src/main/resources/etc/papParameters.yaml