summaryrefslogtreecommitdiffstats
path: root/cps-rest
AgeCommit message (Collapse)AuthorFilesLines
2024-11-29Merge "XML content support on Replace list content"Priyank Maheshwari4-7/+39
2024-11-28XML content support on Replace list contentRudrangi Anupriya4-7/+39
Here to bring Support for XML Response Entity in Replace List content - Add ContentTypeInheadr in cpsData.yml to support application/xml - Add contentTypeInHeader parameter to accept xml in DataRestController.java - Modify the code return xml Data - written testcase for above changes made Issue-ID: CPS-2411 Change-Id: Ibb7ffb66ccdd03703266123c6d5c2eade0e7cb4a Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-11-27Minor refactor of CPS rest controllerdanielhanrahan1-12/+3
Use streams to simplify logic Issue-ID: CPS-2416 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1c37ac9c2fa7543e94f8cd60447f4a879a7376f7
2024-11-22Make Content-Type header default to JSON for CPS APIsdanielhanrahan4-34/+59
Recent changes for XML support have made Content-Type header mandatory, where before it was not. This change makes CPS default to JSON if Content-Type is not specified. Issue-ID: CPS-2517 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ic3718bfe7aedd6fe9dbd978f520179b184c9c932
2024-11-17XML content support for only cps Query v2Rudrangi Anupriya3-20/+73
Here to bring Support for XML Response Entity in query data nodes - Add ContentTypeInheadr in cpsQueryV2.yml to support application/xml - Add contentTypeInHeader parameter to accept xml in QueryRestController.java - Implement logic to convert data to xml - written testcase for above changes made Issue-ID: CPS-2359 Change-Id: Ieb7eeb66ccbb03703626132c6d5c2eade0e7cb4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-11-13Fix for cps-master-merge-java job after removing oParentsourabh_sourabh1-0/+5
Issue-ID: CPS-2496 Change-Id: I94eef4006b8c96db2c9d350c3330edf98924099c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-11-05XML content support on get a nodeRudrangi Anupriya4-12/+50
Here to bring Support for XML Response Entity In GET A NODE - Made changes in components.yml to support contentType as application/xml - Add ContentTypeInheadr in cpsDataV2.yml to support application/xml - Add contentTypeInHeader parameter to accept xml in DataRestController.java - Implemented Logic to convert DataMaps To XML Data - written testcase for above changes made Issue-ID: CPS-2280 Change-Id: Ibe7ffb66ccbb03703626132c6d5c2eade0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-10-17Release Stage 7 for 3.5.4seanbeirne1-1/+1
Issue-ID: CPS-2457 Change-Id: Id9a267c587f16f3fb5edb558b33cd0003864ed93 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-10-17Release notes and documentation updates for 3.5.4danielhanrahan1-2/+2
- Release notes update - Update openapi info.version to 3.5.4 - Update scheduled-tasks docs to reflect changes in retry mechanism - Update deployment docs to update configurable timer parameters - Remove unused locked-module-sync.sleep-time-ms Issue-ID: CPS-2457 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ieb559bbfe348848c4b8669410861edfeeb6c9bf3
2024-10-10Copy Swagger file to docs folderegernug1-0/+19
To avoid manual copy/paste errors updates to docs folder for RTD are generated and copied when compiling CPS Issue-ID: CPS-2332 Change-Id: I1a64f7cc74a82341403f8125adc5216ef046429c Signed-off-by: egernug <gerard.nugent@est.tech>
2024-10-09Implementation of Data validation feature in Create a Node APIArpit Singh4-7/+42
Added support to validate JSON/XML data without the need of persisting it in the databse. - added "dryRunInQuery" flag as a new query parameter - added new method as part of CpsDataService layer to perform data validation - added new method in yang parser "validateData" to validate data without persisting it Issue-ID: CPS-2361 Change-Id: I43dd33cc6120576d0fac606d5c4b0168d107311d Signed-off-by: Arpit Singh <as00745003@techmahindra.com>
2024-10-04Bump CPS to 3.5.4-SNAPSHOTmpriyank1-1/+1
- bump cps to 3.5.4-SNAPSHOT - updated release notes Issue-ID: CPS-2434 Change-Id: I3d5e6f37711bb29b61b598cc5af57ecfdc35cbba Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-10-04Revert "[1/2] Move Swagger API to docs folder"Lee Anjella Macabuhay11-2/+1520
This reverts commit b76392e2d1629d4eb67b10c450cdd954ef678966. Reason for revert: Release blocker Change-Id: Ic477dbaaad34992c8f440981d92f12b977cdf96e Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-10-03Revert "Fix inputSpec for openapi code gen"Lee Anjella Macabuhay1-2/+2
This reverts commit 4baa75b06dcfb9365a8ea5cde03d77d7f21fa01c. Reason for revert: Release blocker Change-Id: I6156461de64dcec41e3f84cbd0cf90f63938bea6 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-09-27Fix inputSpec for openapi code genegernug1-2/+2
Existing inputSpec only accessible from cps root. Changing path to be accessible elsewhere Issue-ID: CPS-2332 Change-Id: I94ada93ea3c88d2fdca84d49c21e1ffc2923f4b2 Signed-off-by: egernug <gerard.nugent@est.tech>
2024-09-26Merge "[1/2] Move Swagger API to docs folder"Toine Siebelink11-1520/+2
2024-09-24Reduce anchor lookups related to PrefixResolver (CPS-2417 #1)danielhanrahan4-22/+39
Instead of looking up same Anchor many times inside a for-loop, do it once outside the loop. This greatly improves performance in some cases, such as v2 GET API: - /cps/api/v2/dataspaces/{dataspace}/anchors/{anchor}/node Testing shows 3x faster response time. Issue-ID: CPS-2417 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I80d97d8cc24372eed70626ed840cad985cbe0a4b
2024-09-18[1/2] Move Swagger API to docs folderegernug11-1520/+2
Code generation moved to docs folder for cps-core Issue-ID: CPS-2332 Change-Id: I9a8c5007a3039e0f46114c589de0756d6de91127 Signed-off-by: egernug <gerard.nugent@est.tech>
2024-09-10Renaming Delta Operations as per RFC 9144Arpit Singh2-7/+7
RFC 9144 recommends naming convention for operations that can be performed on any datastore. The recommended names are: - create - remove - replace Whereas in CPS Delta feature these operaitions were named: - add - remove - update So, "add" and "update" operations have been changed to "create" and "replace" respectively. Issue-ID: CPS-2393 Change-Id: Ie39f5f8ccc91e96cf484ca7fbc833a6be8758054 Signed-off-by: Arpit Singh <as00745003@techmahindra.com>
2024-08-21Bump CPS to 3.5.3-SNAPSHOTdanielhanrahan1-1/+1
- bump CPS to 3.5.3-SNAPSHOT - updated the release notes and prepared for the next release Issue-ID: CPS-2374 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I60ea5f5864f5818d1ed5078e375cf07b8d713dde
2024-08-21Update openapi for 3.5.2danielhanrahan1-1/+1
- update info.version to 3.5.2 for openapi yamls - update read-the-docs copies of openapi docs Issue-ID: CPS-2374 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7f726f610fe8eff43e281edfe2fc6d9b08f5fc15
2024-08-07Refactoring of CPS Delta APIsArpit Singh4-13/+16
Refactoring of CPS delta APIs from two separate endpoints to a single endpoint. - GET: /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/deltaAnchors - POST: /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/deltaByPayload To new endpoint can perform two operatios as follows: - GET: /v2/dataspaces/{dataspace-name}/anchors/{source-anchor-name}/delta - POST: /v2/dataspaces/{dataspace-name}/anchors/{source-anchor-name}/delta Note: this patch only addresses the issue around refactoring of Delta endpoint to a singular well defined endpoint. A separate patch will be created to refactor the entire Delta feature out of CPS Data, into a separate interface namely CPS Delta Issue-ID: CPS-2310 Change-Id: Ic62c8308cf368b4378235597a11c476809a150b8 Signed-off-by: Arpit Singh <as00745003@techmahindra.com>
2024-08-01Merge "Openapi specs update"Daniel Hanrahan1-5/+1
2024-08-01Openapi specs updatempriyank1-5/+1
- Correcting the openapi info section for CPS-Core, NCMP and NCMP Inventory APIs to reflect the correct released version of the APIs - Also correcting the specs for dataOperationForCmHandle which now handles 200 cmhandle operations instead of 50. Issue-ID: CPS-2333 Change-Id: I8b0e055a8ee77ed86cee6cbfac3123634f7007ed Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-08-01XML content support on add list elementRudrangi Anupriya3-19/+36
Issue-ID: CPS-2287 Change-Id: Ibb7ffb66ccbb03703266132c6d5c2eade0e7cb4a Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-07-24Fix "Create a node" and "Add List Elements" APIs response codeArpit Singh2-2/+1
Create a node and Add list elements APIs would return a 500 response code when a JSON payload mismatching the Schema was sent as part of the request body. Updated the code to return response code 400. Issue-ID: CPS-2319 Change-Id: I86d6af446966790d9e45045b330f0c411fcd0f1d Signed-off-by: Arpit Singh <as00745003@techmahindra.com>
2024-07-16XML content support on replace a node with descendantsRudrangi Anupriya4-26/+40
Issue-ID: CPS-2282 Change-Id: Ibb7ffb65ccbb03703266712c6d5c2eade0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-07-15Bump CPS to 3.5.2 Snapshotmpriyank1-1/+1
- bump CPS to 3.5.2-SNAPSHOT - updated the release notes and prepared for the next release Issue-ID: CPS-2318 Change-Id: I584faf6218e60ad62e32ef8c3cb0deb4047149a2 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-06-20Bump CPS version to 3.5.1-SNAPSHOTmpriyank1-1/+1
- bump cps version to 3.5.1-SNAPSHOT - updated release notes to make it ready for the next release Issue-ID: CPS-2283 Change-Id: I242cae7c95a87c1a9e225cce3eb7b36097f1e5ba Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-06-06CPS Delta API 2: Delta between anchor and payloadArpit Singh4-7/+135
- Second API to get Delta between an anchor and JSON payload - added new API getDeltaByDataspaceAnchorAndPayload - added controller and service layer methods getDeltaByDataspaceAnchorAndPayload - Core Delta algorithm remains same as the first API. getDeltaByDataspaceAnchorAndPayload will call getDeltaBetweenDataNodes Issue-ID: CPS-1836 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: Id74cd930ce48e5cb414aa62c5381b79675788a37
2024-06-05XML content support on update node leavesRudrangi Anupriya4-15/+33
Issue-ID: CPS-2071 Change-Id: Ibe7f59fbfcbb03703626132c6d5c2afde0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-05-15Bump CPS to 3.5.0-SNAPSHOTmpriyank1-1/+1
- bump cps to 3.5.0-SNAPSHOT Issue-ID: CPS-2228 Change-Id: I8a6d7e702b557d5b90dd384bbe429de4958ef77f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-14CPS Bump to 3.4.10-SNAPSHOTmpriyank1-1/+1
- bumping CPS to 3.4.10-SNAPSHOT version Issue-ID: CPS-2221 Change-Id: I8513582791078762bfb9d828966028c233e031db Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-03[BUG] Correctly parse observedTimestampmpriyank1-3/+3
- Using the DateTimeUtility to parse the passed OffsetDateTime and using it for conversion to string - Moving to actual src/main/java from test side as it is to be used in the prod code as well and only keeping the methods in use. - Added test to fix the coverage issue Issue-ID: CPS-2211 Change-Id: I2b4325bb77a6da7fd470986b1da293f455650375 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-01Bump CPS versiondanielhanrahan1-1/+1
- bump cps to 3.4.9-SNAPSHOT - also updated the release notes Issue-ID: CPS-2205 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ifd7feb413baac30e3cbbdf2aeaac5fbb5ae2e463
2024-03-29Bump CPS versionmpriyank1-1/+1
- bump cps to 3.4.8-SNAPSHOT - also updated the release notes Issue-ID: CPS-2168 Change-Id: Iee7f1e2febbf28b0d5a2855d3128d9eb8bb3c490 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-03-29Uplift Spring boot 3.2.4emaclee1-9/+2
- uplifted spring boot from 3.1.2 to 3.2.4 - removed redundant dependencies - upgraded relevant dependencies - use of @Bean(some_name) is give a specific bean name - using @Bean(some_name) with @Qualifier so on the injection point to specify which bean to actually inject, this is used as we deal with multiple beans of the same type. Issue-ID: CPS-2101 Change-Id: I64d5bf567b9eb03fb39034a46528d0160b332715 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-02-29Bump CPS to 3.4.7-SNAPSHOTmpriyank1-1/+1
- bump cps to 3.4.7-snapshot - updated the relese notes Issue-ID: CPS-2135 Change-Id: Ib166ebae2e3de9a727b3d0d4d21832c8858f4108 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-29Remove Http Status 401 for cps core and NCMP(CPS-2126 #3)mpriyank8-56/+0
- Removing Unauthorized Http Status code 401 from the repo for CPS-Core and NCMP Issue-ID: CPS-2134 Change-Id: I535156fa30dd4292ad390177c217ddb3e8942d34 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-27Bump CPS to 3.4.6-SNAPSHOTmpriyank1-1/+1
- bumping CPS to 3.4.6-SNAPSHOT - updated the release notes Issue-ID: CPS-2124 Change-Id: Id28af9340da9c1ce118b2122e97b8717860c7932 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-23Bump CPS to 3.4.5-SNAPSHOTdanielhanrahan1-1/+1
- bump CPS to 3.4.5-SNAPSHOT and update the docs Issue-ID: CPS-2120 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia2ea81b40ec19b87d3b25359fbb25ffdcc3285dd
2024-02-07Bump CPS to 3.4.4-SNAPSHOTdanielhanrahan1-1/+1
- bump CPS to 3.4.4-SNAPSHOT and update the docs Issue-ID: CPS-2077 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1658c83642c8e64903f4bc03b74b6f5726d0227e
2024-01-11Bump CPS to 3.4.3-SNAPSHOTdanielhanrahan1-1/+1
- bump CPS to 3.4.3-SNAPSHOT and update the docs Issue-ID: CPS-2026 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If0036c6245ddbae2a401b712cc13e3208491ed2f
2023-12-20Bump CPS to 3.4.2-SNAPSHOTdanielhanrahan1-1/+1
- bump CPS to 3.4.2-SNAPSHOT and update the docs Issue-ID: CPS-2017 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iea58c1134bc9d25c76ef7ccc2c1d2de1c7aa0bfd
2023-12-18Remove the dependency-cycle between beansToineSiebelink3-34/+46
- Splitting admin service into AnchorService and DataspaceService (this resolves the cyclic dependency) - Improved Delete dataspace integration error tests (were depending on execution order, now independent) Issue-ID: CPS-871 Change-Id: I47efedb6eb4bd2900f72d689616b7b7b62df2938 Signed-off-by: halil.cakal <halil.cakal@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2023-11-14CPS Delta API 1: Delta between 2 anchorsArpit Singh5-1/+100
- CPS Delta Feature Part 1: To find delta between two anchors - created new endpoint deltaByDataspaceAndAnchors - endpoint to take dataspaceName, source anchor, target anchor, xpath, descendants as input - added new service CpsDeltaService - added method to find delta between DataNodes: getDeltaReport - added method to find removed data nodes: getRemovedDeltaReports - added method to get Added DataNodes: getAddedDeltaReports - added method to get Map of xpath to DataNode: convertToXPathToDataNodesMap - added a POJO for delta report - Added new JSON data for delta feature testing - Added groovy test files CpsDeltaServiceImplSpec and DeltaReportBuilderSpec - code related to update operation, will be added in separate commit Issue-ID: CPS-1824 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: I313f0f71d04b03878be7643f709d8af1aa6df6ba
2023-11-09Bump CPS to 3.4.1-SNAPSHOTmpriyank1-1/+1
- bumped CPS to 3.4.1-SNAPSHOT - updated the release notes Issue-ID: CPS-1962 Change-Id: Iee9fa03a1890ac5d4c1204d0851a255c5b897720 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-11-07Bump cps to 3.4.0-SNAPSHOTsourabh_sourabh1-1/+1
- bump cps to 3.4.0-SNAPSHOT and update the docs Issue-ID: CPS-1936 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I6a99662c72b236e49abcd79201156bf0a9572de7
2023-11-06Bump cps to 3.3.10-SNAPSHOTmpriyank1-1/+1
- bump cps to 3.3.10-SNAPSHOT and update the docs Issue-ID: CPS-1954 Change-Id: Id62f59d4b3c42ea6f791fad85f0700089e3125b9 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-10-17[BUG] Fix for Swagger UI generationegernug1-2/+1
Issue-ID: CPS-1913 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Ib8a1b5fddc9957bd371fbb4dc54d018b25af3679