Validate controller input and provide expected response 47/123247/9
authorRenu Kumari <renu.kumari@bell.ca>
Tue, 10 Aug 2021 20:43:04 +0000 (16:43 -0400)
committerRenu Kumari <renu.kumari@bell.ca>
Thu, 19 Aug 2021 11:13:57 +0000 (07:13 -0400)
commitea04c07ad990b5543766e95e234cae746bd1fbc1
treec50008212dbf1471e859c0f9f681baa146a57c7c
parent25ed5a8a63e88edd0b9c8285b640839a6e93866a
Validate controller input and provide expected response

- validate endpoint input
- set default values if it is missing in the optional fields
- used hateoas for previous and next record link generation
- use service layer in controller layer

Issue-ID: CPS-449
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I7936cd9e8e7dead3b5650b421bb12f10d14ffa9b
19 files changed:
docs/api/swagger/openapi.yml
pom.xml
src/main/java/org/onap/cps/temporal/controller/event/model/CpsDataUpdatedEventMapper.java
src/main/java/org/onap/cps/temporal/controller/rest/QueryController.java
src/main/java/org/onap/cps/temporal/controller/rest/QueryExceptionHandler.java [new file with mode: 0644]
src/main/java/org/onap/cps/temporal/controller/rest/QueryResponseFactory.java [new file with mode: 0644]
src/main/java/org/onap/cps/temporal/controller/rest/model/AnchorDetailsMapper.java [new file with mode: 0644]
src/main/java/org/onap/cps/temporal/controller/rest/model/SortMapper.java [new file with mode: 0644]
src/main/java/org/onap/cps/temporal/controller/utils/DateTimeUtility.java [new file with mode: 0644]
src/main/java/org/onap/cps/temporal/domain/SearchCriteria.java
src/main/java/org/onap/cps/temporal/service/NetworkDataServiceImpl.java
src/main/resources/application.yml
src/test/groovy/org/onap/cps/temporal/controller/event/model/CpsDataUpdatedEventMapperSpec.groovy
src/test/groovy/org/onap/cps/temporal/controller/rest/QueryControllerDataBuilder.groovy [new file with mode: 0644]
src/test/groovy/org/onap/cps/temporal/controller/rest/QueryControllerSpec.groovy
src/test/groovy/org/onap/cps/temporal/domain/SearchCriteriaSpec.groovy
src/test/groovy/org/onap/cps/temporal/repository/NetworkDataRepositoryImplSpec.groovy
src/test/groovy/org/onap/cps/temporal/service/NetworkDataServiceImplSpec.groovy
src/test/resources/application.yml