aboutsummaryrefslogtreecommitdiffstats
path: root/cps-rest/docs
AgeCommit message (Collapse)AuthorFilesLines
2024-12-12Implementation of Data validation feature in CPS APIsRudrangi Anupriya2-1/+5
Added support to validate JSON/XML data without the need of persisting it in the database. - added "dryRunInQuery" flag as a new query parameter in update/Replace/Add APIs - added new method as part of CpsDataService layer to perform data validation Issue-ID: CPS-2516 Change-Id: I87bb33dd6021567d0fac606d5c4b0168d107311c Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-12-03Added performance section and updated api versionmpriyank1-1/+1
- Added a performance section to the release notes - Populated the correct info.version for NCMP and CPS Rest interfaces Issue-ID: CPS-2537 Change-Id: Iae07da57fc45100b4d250fcfb86a95079869b221 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-11-28XML content support on Replace list contentRudrangi Anupriya1-1/+10
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-22Make Content-Type header default to JSON for CPS APIsdanielhanrahan1-1/+2
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 Anupriya1-0/+10
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-05XML content support on get a nodeRudrangi Anupriya2-1/+12
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 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-09Implementation of Data validation feature in Create a Node APIArpit Singh2-0/+10
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-04Revert "[1/2] Move Swagger API to docs folder"Lee Anjella Macabuhay10-0/+1494
This reverts commit b76392e2d1629d4eb67b10c450cdd954ef678966. Reason for revert: Release blocker Change-Id: Ic477dbaaad34992c8f440981d92f12b977cdf96e Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-09-18[1/2] Move Swagger API to docs folderegernug10-1494/+0
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 Singh1-3/+3
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-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 Singh3-10/+13
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 Anupriya1-1/+10
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 Anupriya2-5/+14
Issue-ID: CPS-2282 Change-Id: Ibb7ffb65ccbb03703266712c6d5c2eade0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-06-06CPS Delta API 2: Delta between anchor and payloadArpit Singh2-4/+58
- 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 Anupriya2-3/+14
Issue-ID: CPS-2071 Change-Id: Ibe7f59fbfcbb03703626132c6d5c2afde0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
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>
2023-11-14CPS Delta API 1: Delta between 2 anchorsArpit Singh3-0/+62
- 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-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
2023-08-03Merge "Support pagination in query across all anchors(ep4)"Luke Gleeson2-1/+19
2023-08-02Support pagination in query across all anchors(ep4)rajesh.kumar2-1/+19
Add pagination query parameters in query across all anchors API pagination parameters (pageIndex and pageSize) are optional default is to query all fragments each pageSize represents number of records(number of anchors) TotalRecords is returned in response header to find number of pages. - If pagination option is provided in request then query number of anchors equal to pageSize. pageIndex is used for setting offset. - return number of records(one anchor per record) as per pagesize and pageSize Issue-ID: CPS-1605 Change-ID: I73f97f986a817d423f93a8d922dcd9647b2504bc Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2023-07-28Add 'direct' keyword to descendants option to query direct children (ep1)Rudrangi Anupriya1-1/+1
-added 'direct' keyword also to Fetch Descendants Option along with 'all' and 'none' to Query direct child. -added unit tests to test direct keyword Issue-ID:CPS-1784 Change-Id: Iab7f59fbeebb03703626132c6d5c2afde0e5ab4d Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-06-26Chsnge to OpenApi 3.0egernug1-2/+2
In preparation for the Java 17 and Springboot 3 migrations Swagger Codegen has to upgrade to OpenApi 3.0 This effects cps-rest and cps-ncmp-rest Issue-Id: CPS-1745 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I18b8e9ca26d0123009702c2474efbfbeec6d4c44
2023-04-20Correct documentation for GET node APIemaclee1-2/+2
- Add new section on documentation to describe XPath - Correct doc description on GET node API Issue-ID: CPS-1607 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I23e4ccd1185a2d93fbb0b9e02e9daab949c0f952
2023-03-21Query data nodes across all anchors under one dataspacerajesh.kumar3-0/+54
Issue-ID: CPS-1396 Change-ID: I73f97f986a817d423f93a8d922dcd9647b1412ab Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2023-03-20CPS-1526 Fix response message for PATCH operationarpitsingh1-1/+2
- Fixed the Response code and message when trying to update multiple data trees at once - Response code changed to 400 - Since the patch operation across multiple data trees is not supported when xpath is set to root node xpath, appropriate message is returned in response - Existing functionality of updating one data node with root node xpath remains as it is. - Updated API documentation and release notes Issue-ID: CPS-1526 Signed-off-by: arpitsingh <as00745003@techmahindra.com> Change-Id: I5d25a06bb5d407316ccfb2f85877cbe56a9f6f31
2023-02-17CPS-1401 Implement V2 of GET Data Node APIarpitsingh1-1/+1
- Modified the GET Data Node API so it returns all the data nodes when xpath set to root "/" - Fragment Repository now returns a collection of Fragment Entities - Instead of returning only the first Fragment Entity now all fragment entities are returned when xpath is set to root - The Fragemnt Entities are further processed to a Collection of Data Nodes. As opposed to singular Data Node in current implementation. - Finally the DataRestController also returns a Collection of Data Nodes when xpath is set to root and valid data is present - Response body changed from JSON object to JSON Array. - Exception handling for invalid xpath and non-existing xpath is now done separately at persistence layer. - Refactored code against CPS-1422 - Deprecated getDataNode method from Service and Persistence layer - Modified V1 of Get Data Node API to use the getDataNodes method and get the first data node from the collection returned. - Modified NCMP to use getDataNodes method - NCMP still does not support multiple data nodes. It retrieves the first data node from the collection returned by getDataNodes Signed-off-by: arpitsingh <as00745003@techmahindra.com> Change-Id: I494a5740a53f65376d135fcb9f1e2e8900a2803e
2023-02-03Descendants description changed in openApirajesh.kumar1-1/+1
Issue-ID: CPS-1381 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0203aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2023-01-23Added depth parameter in query nodes API.rajesh.kumar7-43/+156
Issue-ID: CPS-1381 Change-ID: I73f97f986a817d423f93a8d922dcd9647b1206bb Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2022-12-22XML content on create anchors node supportMichal Jagiello2-1/+32
Add XML content type support on anchor node creation. Issue-ID: CPS-1257 Change-Id: I7e7a9a1961b6e81de93a4e32e842b47f8a163a09 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Signed-off-by: Lee Anjella Macabuhay <lee.anjella.macabuhay@est.tech>
2022-12-16API versioning supported and added different versions for POST APIsrajesh.kumar8-102/+294
Issue-ID: CPS-1189 Change-ID: I73f97f986a817d423f92f8d922dcd9647b1214aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2022-12-09Added API to get all schema sets for a given dataspace.rajesh.kumar2-1/+26
Issue-ID: CPS-1187 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0914aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2022-11-18Added get APIs for dataspace.rajesh.kumar3-1/+68
Issue-ID: CPS-1186 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0829aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2022-10-24[NCMP] Add Basic Auth to OpenAPI DefinitionsJosephKeenan1-0/+8
-Adding basic auth to OpenAPI definitions Issue-ID: CPS-1350 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: Iab677f2abc07eed8c3e2910191b15ba27028ee88
2022-03-30Additional validation for names/identifiersDylanB95EST1-0/+2
Implementing additional regex validation for names/identifiers in CPS - Introduces a CpsValidator - Applies to relevent java public API's - Tests have been updated where necessary Issue-ID: CPS-322 Change-Id: I29ab8820bb1fe0eee247e425d6bb018bcd38f28e Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-03-10Replacing ModelMapper with MapStructlukegleeson1-0/+2
- 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-02-28Updated openapi.yaml to match to changes in get data node APIputhuparambil.aditya3-29/+19
1. updated the pom version to 3.0.0-SNAPSHOT 2. modified the examples for get data node api to match the post api. Issue-ID: CPS-865 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Icf03522e9ba7fb9c245fd9f09b3eb8bb6f3ee60d
2022-01-31[TECHDEBT] Align CPS Core REST API Specification and ImplementationJosephKeenan4-24/+59
Issue-ID: CPS-822 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: Idde7525628f7e1425602069e0d75506ac621113e
2021-12-02Adding examples in openapi for cps-coreputhuparambil.aditya3-24/+111
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/+20
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/+23
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 NodesDylanB95EST2-12/+12
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 Kumari5-0/+740
- 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-07-16CPS-401 Update Open API YAML with data types and example for output (cpsData)JosephKeenan5-743/+0
-added response for get data nodes based on dataspace and anchor -modified modelmapper jn DataRestControllerSpec to be Spy not Mock -when openapi.yaml is entered into https://editor.swagger.io/ it displays however locally it does not, This may be due to file segmentation but this is still unclear. -moved files from docs/openapi to src/main/resources/static as required for new swagger sprindoc Issue-ID: CPS-401 Change-Id: I45286530d9a9ca85b56c0a656a44675398a003f4 Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2021-07-13Editing of Nordix Licenses to ONAP guidelineslukegleeson2-2/+5
Issue-ID: CPS-489 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I415534515b3d8325f41d5dc1d02c6e0ae70c6cf1
2021-06-18Merge "Missing licence info added in pom file"Bruno Sakoto5-0/+82