aboutsummaryrefslogtreecommitdiffstats
path: root/cps-rest/docs
diff options
context:
space:
mode:
Diffstat (limited to 'cps-rest/docs')
-rw-r--r--cps-rest/docs/openapi/components.yml23
-rw-r--r--cps-rest/docs/openapi/cpsData.yml12
-rw-r--r--cps-rest/docs/openapi/cpsDataV2.yml8
-rw-r--r--cps-rest/docs/openapi/openapi.yml15
4 files changed, 38 insertions, 20 deletions
diff --git a/cps-rest/docs/openapi/components.yml b/cps-rest/docs/openapi/components.yml
index a2587eb56d..40f0e170ff 100644
--- a/cps-rest/docs/openapi/components.yml
+++ b/cps-rest/docs/openapi/components.yml
@@ -141,17 +141,17 @@ components:
name: kids
deltaReportSample:
value:
- - action: "ADD"
+ - action: "create"
xpath: "/bookstore/categories/[@code=3]"
target-data:
code: 3,
name: "kidz"
- - action: "REMOVE"
+ - action: "remove"
xpath: "/bookstore/categories/[@code=1]"
source-data:
code: 1,
name: "Fiction"
- - action: "UPDATE"
+ - action: "replace"
xpath: "/bookstore/categories/[@code=2]"
source-data:
name: "Funny"
@@ -183,6 +183,14 @@ components:
schema:
type: string
example: my-anchor
+ sourceAnchorNameInPath:
+ name: source-anchor-name
+ in: path
+ description: source-anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
schemaSetNameInQuery:
name: schema-set-name
in: query
@@ -312,6 +320,15 @@ components:
schema:
type: integer
example: 10
+ dryRunInQuery:
+ name: dry-run
+ in: query
+ description: Boolean flag to validate data, without persisting it. Default value is set to false.
+ required: false
+ schema:
+ type: boolean
+ default: false
+ example: false
responses:
NotFound:
diff --git a/cps-rest/docs/openapi/cpsData.yml b/cps-rest/docs/openapi/cpsData.yml
index 1e70ef60c8..daf59bbfbf 100644
--- a/cps-rest/docs/openapi/cpsData.yml
+++ b/cps-rest/docs/openapi/cpsData.yml
@@ -32,15 +32,24 @@ listElementByDataspaceAndAnchor:
- $ref: 'components.yml#/components/parameters/anchorNameInPath'
- $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
- $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
+ - $ref: 'components.yml#/components/parameters/contentTypeInHeader'
requestBody:
required: true
content:
application/json:
schema:
- type: object
+ type: string
examples:
dataSample:
$ref: 'components.yml#/components/examples/dataSample'
+ application/xml:
+ schema:
+ type: object
+ xml:
+ name: stores
+ examples:
+ dataSample:
+ $ref: 'components.yml#/components/examples/dataSampleXml'
responses:
'201':
$ref: 'components.yml#/components/responses/Created'
@@ -93,6 +102,7 @@ nodesByDataspaceAndAnchor:
- $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
- $ref: 'components.yml#/components/parameters/anchorNameInPath'
- $ref: 'components.yml#/components/parameters/xpathInQuery'
+ - $ref: 'components.yml#/components/parameters/dryRunInQuery'
- $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
- $ref: 'components.yml#/components/parameters/contentTypeInHeader'
requestBody:
diff --git a/cps-rest/docs/openapi/cpsDataV2.yml b/cps-rest/docs/openapi/cpsDataV2.yml
index a1433badf6..d5a8ef3891 100644
--- a/cps-rest/docs/openapi/cpsDataV2.yml
+++ b/cps-rest/docs/openapi/cpsDataV2.yml
@@ -46,7 +46,7 @@ nodeByDataspaceAndAnchor:
$ref: 'components.yml#/components/responses/InternalServerError'
x-codegen-request-body-name: xpath
-deltaByDataspaceAndAnchors:
+delta:
get:
description: Get delta between two anchors within a given dataspace
tags:
@@ -55,7 +55,7 @@ deltaByDataspaceAndAnchors:
operationId: getDeltaByDataspaceAndAnchors
parameters:
- $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
- - $ref: 'components.yml#/components/parameters/anchorNameInPath'
+ - $ref: 'components.yml#/components/parameters/sourceAnchorNameInPath'
- $ref: 'components.yml#/components/parameters/targetAnchorNameInQuery'
- $ref: 'components.yml#/components/parameters/xpathInQuery'
- $ref: 'components.yml#/components/parameters/descendantsInQuery'
@@ -76,8 +76,6 @@ deltaByDataspaceAndAnchors:
'500':
$ref: 'components.yml#/components/responses/InternalServerError'
x-codegen-request-body-name: xpath
-
-deltaByDataspaceAnchorAndPayload:
post:
description: Get delta between an anchor in a dataspace and JSON payload
tags:
@@ -86,7 +84,7 @@ deltaByDataspaceAnchorAndPayload:
operationId: getDeltaByDataspaceAnchorAndPayload
parameters:
- $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
- - $ref: 'components.yml#/components/parameters/anchorNameInPath'
+ - $ref: 'components.yml#/components/parameters/sourceAnchorNameInPath'
- $ref: 'components.yml#/components/parameters/xpathInQuery'
requestBody:
content:
diff --git a/cps-rest/docs/openapi/openapi.yml b/cps-rest/docs/openapi/openapi.yml
index b4e0b70408..95c32312cf 100644
--- a/cps-rest/docs/openapi/openapi.yml
+++ b/cps-rest/docs/openapi/openapi.yml
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2023 Nordix Foundation
+# Copyright (C) 2021-2024 Nordix Foundation
# Modifications Copyright (C) 2021 Pantheon.tech
# Modifications Copyright (C) 2021 Bell Canada.
# Modifications Copyright (C) 2022-2024 TechMahindra Ltd.
@@ -23,7 +23,7 @@ openapi: 3.0.3
info:
title: ONAP Open API v3 Configuration Persistence Service
description: Configuration Persistence Service is a Model Driven Generic Database
- version: "1.0.0"
+ version: "3.5.4"
contact:
name: ONAP
url: "https://onap.readthedocs.io"
@@ -31,10 +31,6 @@ info:
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0"
- x-planned-retirement-date: "202212"
- x-component: "Modeling"
- x-logo:
- url: "cps_logo.png"
servers:
- url: /cps/api
@@ -104,11 +100,8 @@ paths:
/{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
$ref: 'cpsData.yml#/listElementByDataspaceAndAnchor'
- /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/deltaAnchors:
- $ref: 'cpsDataV2.yml#/deltaByDataspaceAndAnchors'
-
- /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/deltaPayload:
- $ref: 'cpsDataV2.yml#/deltaByDataspaceAnchorAndPayload'
+ /v2/dataspaces/{dataspace-name}/anchors/{source-anchor-name}/delta:
+ $ref: 'cpsDataV2.yml#/delta'
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
$ref: 'cpsQueryV1Deprecated.yml#/nodesByDataspaceAndAnchorAndCpsPath'