aboutsummaryrefslogtreecommitdiffstats
path: root/cps-rest/src/main/java
AgeCommit message (Collapse)AuthorFilesLines
2022-03-10Replacing ModelMapper with MapStructlukegleeson3-56/+52
- Removed Model Mapper from pom files - Replaced ModelMapper with MapStruct - Added Tests for MapStruct - Changed mapstruct annotations for individual variables to be null safe rather than all variables - Excluded generated code from code coverage - Set ModuleReferences input to required for SchemaSet so that ModuleReferences list set to empty list rather than null Issue-ID: CPS-127 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I43f874aea79f58dda5526c6fdead27d8474d90af
2022-03-01Create Endpoint For Get Cm Handles By NameDylanB95EST1-10/+5
Create endpoint and implement logic for get cm handle details by cm handle name Issue-ID: CPS-817 Change-Id: I83bd2da9219d13fac715a08b19108028ca6f6751 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-02-17Align JSON DataNode for Get and Post/Put API in CPSputhuparambil.aditya2-5/+5
Issue-ID: CPS-865 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I60b1f9c94e79bdd66d60fe6a68f5fc4adc718d35
2022-02-14Improve logging in NCMPsourabh_sourabh1-0/+3
- Code to change to apply logs at runtime - Fix for minor code smell Issue-ID: CPS-855 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I93a556fe0fb7ca05a42e84eb5ec4f84afaa8fd92
2022-01-27Merge "Improve logging in NCMP"Toine Siebelink1-4/+1
2022-01-25Improve logging in NCMPsourabh_sourabh1-4/+1
Issue-ID: CPS-855 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I5d8a6a711d1c6b13d5d8eeba52a1dcd689dbdae2
2022-01-25Replace gson mapper with jackson mappersourabh_sourabh2-21/+23
We introduced JsonObjectMapper (wapper) as Spring component. Issue-ID: CPS-751 Change-Id: I536b0771a3a263325e6907717baf6941d70c0d6c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-01-07CPS-Core: Unable to parse JSON input with space for POST endpointsourabh_sourabh1-9/+11
Issue-ID: CPS-831 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: If2f5f7034f05763990001c9dd8ccd9d8dc0099cf
2021-12-02Adding examples in openapi for cps-coreputhuparambil.aditya1-13/+15
1. Added examples for all parameters, request body and response body 2. Changed the response/request type to Object from String for all json objects 3. Passed json format data in all tests 4. PUT and PATCH operations at present return empty response, hence examples are changed to be in sync Issue-ID: CPS-780 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: If6dd5bb48df4e1bbf1026eaadf315df8f972e282
2021-11-23CPS-314: Delete Dataspaceniamhcore1-0/+12
Issue-ID: CPS-314 Change-Id: I778e2b784c7b1ff3fecc1036425708dc4ec73227 Signed-off-by: niamhcore <niamh.core@est.tech>
2021-11-02Delete DataNode (xpath) for a given AnchorDylanB95EST1-0/+8
Delete Datanode within CPS. Deprecates delete functionality of /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes. New api is backwards compatible with this API Issue-ID: CPS-313 Change-Id: I110c4ab1446e8a1399a0d9bf89c0be614a9104df Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-11-02Clean Up Code around List NodesDylanB95EST1-8/+8
Make sure code refers clearly to List (whole) nodes or List elements incl. method names, parameter names, test descriptions etc. Issue-ID: CPS-756 Change-Id: Ic9dae6565c0e84c1ba4c2d6e891d3ea307f589da Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-09-01Add ncmp endpoints to swagger-uiRenu Kumari3-33/+1
- added ncmp-enpoints to swagger-ui - removed springfox dependencies - removed Docket configuration as we are loading ui from openapi.yml - removed endpoints which are not implemented - Fixed ncmp basepath as per CPS-616 Issue-ID: CPS-601 Issue-ID: CPS-616 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: I03c7789f48a12d3ffd5fcb934d7ba6347d4044e4
2021-08-25Add optional observed timestamp in the cps data apiaditya puthuparambil2-18/+46
- Added optional query parameter in cps data endpoints - Updated service layer and notification to use observedTimestamp Note: - NCMP REST endpoints are not updated as a part of this patch - NCMP does not sent observed timestamp when using cps data services Issue-ID: CPS-477 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I1f92da3da7b3a13c45405fdf44e5fef861991d9a Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
2021-08-18Delete list-node p2 rest layerlukegleeson1-0/+7
Issue-ID: CPS-361 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I5fb8d202fc0a65679d10377cc2959a7f8f854ca7
2021-08-11Merge "Update response query format"aditya puthuparambil1-1/+9
2021-08-11Update response query formatniamhcore1-1/+9
Issue-ID: CPS-560 Change-Id: I1c71270a8cde7e940c5af80bc743d0f01ab6b9bb Signed-off-by: niamhcore <niamh.core@est.tech>
2021-08-10Upgrade Swager Codegen-maven-pluginJosephKeenan2-15/+19
- Removed swagger annotations dependency as latest plugin generates code using v3 annotations. - updated the method signature as per the new generated code - removed unnecessary mock springbeans from the WebMvcTest Issue-ID: CPS-205 Change-Id: Ie7911d7389dca587bde945d913f458de46027e0f Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2021-07-13Editing of Nordix Licenses to ONAP guidelineslukegleeson5-9/+13
Issue-ID: CPS-489 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I415534515b3d8325f41d5dc1d02c6e0ae70c6cf1
2021-07-09Support concurrent requests to create schema setsBruno Sakoto1-1/+4
Issue-ID: CPS-466 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I2ecf98b9aa5a6097518e616c08f8bb2a2182a613
2021-06-21Sonar Qube code smell clean upDylanB95EST1-2/+2
Declaring Local Variable with Var Instead Issue-ID: CPS-475 Change-Id: I94bb6d4a3234cd9abeba5a495bd2d0439c21c1df Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-06-15[OpenAPI] Implemented example as per example wiki page for getting anchors ↵JosephKeenan1-7/+70
based on dataspace -moved components from cpsAdmin.yml to components.yml -refactored variable for anchor details list in AdminRestController.java -reintrocuded paramter for anchorsByDataspace -refactored variables in AdminRestController.java getAnchors() to be more intuitive -refactored AdminRestController.java to use modelmapper and removed extra conversion code. Also modified AdminRestControllerSpec.groovy to use ModelMapper as Spy rather than a Mock -added responses for getAnchor & getSchemaSet -added javadoc for AdminRestController.java public methods -refactored schemaDetils pararmeter from dataSpasceName to name for CSOT tests & added some code review comments Issue-ID: CPS-429 Change-Id: I01d4113313c9a23d9a7e0e96e46b90f9ac767f24 Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2021-05-25Replace list-node content (part 2): CPS REST layerRuslan Kashapov1-0/+7
Issue-ID: CPS-362 Change-Id: I46dc9b48758fa10a47a648aa4e6a63775466234b Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-05-20Response code fix (Bad Request instead of Not Found) when modifying ↵Ruslan Kashapov1-2/+6
non-existent node. Issue-ID: CPS-422 Change-Id: I6652f8bcafb9938ce588be3d0a0d2bb1672723b0 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-05-11Create list-node elements (part2): CPS REST layerRuslan Kashapov1-1/+8
Issue-ID: CPS-360 Change-Id: Iaca8baff085e1659453c06ce0dee0203aa007b4a Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-04-28Fix Code smellsshivasubedi4-14/+11
Issue-ID: CPS-89 Change-Id: Ib1b6fbc6b6d712f169100825683e6db3e7c85cb9 Signed-off-by: shivasubedi <shiva.subedi@est.tech>
2021-04-26Get Data under anchor using single rootRishi.Chail1-5/+2
Issue-ID: CPS-325 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: Id8da3d767199c5767c625b55d175ac6791dcca48
2021-04-20Create child data node (part 1): CPS service + RESTRuslan Kashapov1-6/+14
Issue-ID: CPS-337 Change-Id: I9c5c62d144b5301ac80e2b82a5cc66a980dad011 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-04-07Fix SonarQube violationsToineSiebelink1-1/+1
- Used @SupressWarning where issue was casued by 3PP we have not control over - Remove TODO's which are now addt to backlog as new JIRA's; CPS-324 and CPS-325 Issue-ID: CPS-89 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ieb64fd6d3f09144f6dea965c0aee3aefa6ec253c
2021-04-07Delete anchor part 2: cps restRuslan Kashapov1-7/+9
Issue-ID: CPS-312 Change-Id: I08f92dfff3188bd96a69ec2ae01e0d0891b81d87 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-04-06Fix for security hotspot related to safe archive expansionputhuparambil.aditya2-8/+97
https://sonarcloud.io/project/security_hotspots?id=onap_cps&hotspots=AXfObcsqA2pnU4Plp4-g Issue-ID: CPS-289 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Ibe8627413fc9e3964cdc5bb98caf5e25fa4f3a95
2021-03-24Internal Server Error when creating the same data node twiceniamhcore1-6/+5
This change adds a generic exception handler class for a already defined object and handles a JsonSyntaxException. Issue-ID: CPS-290 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ie645237b5dd5b8e2b1d074c5613e7da560f57484
2021-03-18Fix code smellsRishi.Chail1-2/+2
1. removed typedefs annotation 2. chnaged final string constant name Issue-ID: CPS-89 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I524aa8c13e8bb4c6a00d810c6e89b30a48f37d10
2021-03-12Merge "Move web security configuration to application module"Toine Siebelink1-66/+0
2021-03-12Move web security configuration to application moduleRuslan Kashapov1-66/+0
Issue-ID: CPS-288 Change-Id: Ieba184c3e4727e354c19a3db31325052d15ced44 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-03-11Exception stack trace is exposedniamhcore1-20/+14
Issue-ID: CPS-249 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I1e03c17364c925c6f976f2147cb17f8ac26ba995
2021-03-11Suppress csrf sonar security hotspot warningBruno Sakoto1-0/+5
Issue-ID: CPS-285 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I95d2b7d48714d21e2cdcaab36f3ba9903f0b5342
2021-03-09Improve error reporting for invalid cps path queryniamhcore1-2/+6
Issue-ID: CPS-276 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I0e0abbaff32c936c67fc1092dc8385a0bc5ae49e
2021-03-05Add basic authentication securityBruno Sakoto1-0/+61
Endpoints exposed outside from the cluster require basic authentication except actuator health and info endpoints. Default user credentials are embedded in the application, they can be overridden with system environment properties. Issue-ID: CPS-175 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I3dfa0e49e5f4538c923e6bbe9bef976d30359fe6
2021-03-02CPS-265 - updating cps path to support include-descendants option.niamhcore1-2/+5
Issue-ID: CPS-265 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I9e9b84760dbc8b5eb4b31ab972fdb2d186c6bb48
2021-02-22Rest & Java API layer - Query Datanodes using cpsPath that contains contains ↵niamhcore1-0/+48
a leaf name and a leaf value Issue-ID: CPS-231 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I3bf2a9946746ad06ddb4bc832206a36b78ff2175
2021-02-18Data fragment update by xpath #3 - rest and service layersRuslan Kashapov1-3/+17
Issue-ID: CPS-58 Change-Id: Ie224da95b07748b63648226df6484cebae91cdec Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-26Ensure CPS REST API Specs conform to ONAP standardsRishi.Chail1-1/+1
Issue-ID: CPS-25 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I17fec852cf2dcb824dfc0ab7f00ebe4cfd9e09b5
2021-02-04Fetching data node by xpath - rest and service layersRuslan Kashapov2-6/+19
IssueID: CPS-71 Change-Id: I54801fc12a8aa700d85e774780c9990b7f19c747 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-02-04Merge "Decouple configuration from application"Toine Siebelink4-36/+7
2021-02-01Decouple configuration from applicationClaudio D. Gasparini4-36/+7
- Decouple configuration from application - Generate all 3 types of docker variations Issue-ID: CPS-175 Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I1e2e0577c5911f7c79801e4c691d196515dc02a1
2021-02-01Merge "Retrieve an Anchor for a given dataspace by anchor name - REST layer"Toine Siebelink1-1/+2
2021-02-01Attach a (JSON) data instance for a container with children to a given Anchorniamhcore1-9/+9
Issue-ID: CPS-26 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I38fc1b1a6ccf84e64eff3218372b40c8fa2491ba
2021-01-23Retrieve an Anchor for a given dataspace by anchor name - REST layerRishi.Chail1-1/+2
Issue-ID: CPS-186 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I2dceb582c6277e56400dfbc46340c70d814603ee
2021-01-22Merge "Enable log level management via actuator, /cps/api path to use for ↵Toine Siebelink2-0/+4
REST controllers only only"