diff options
Diffstat (limited to 'cps-rest/docs')
-rw-r--r-- | cps-rest/docs/openapi/components.yml | 33 | ||||
-rw-r--r-- | cps-rest/docs/openapi/cpsData.yml | 28 | ||||
-rw-r--r-- | cps-rest/docs/openapi/cpsDataV2.yml | 17 | ||||
-rw-r--r-- | cps-rest/docs/openapi/cpsQueryV2.yml | 10 | ||||
-rw-r--r-- | cps-rest/docs/openapi/openapi.yml | 15 |
5 files changed, 75 insertions, 28 deletions
diff --git a/cps-rest/docs/openapi/components.yml b/cps-rest/docs/openapi/components.yml index 01375f503d..728295fd31 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 @@ -279,13 +287,15 @@ components: type: string enum: [v1, v2] default: v2 - contentTypeHeader: + contentTypeInHeader: name: Content-Type in: header - description: Content type header + description: Content type in header schema: type: string - example: 'application/json' + enum: + - application/json + - application/xml required: true descendantsInQuery: name: descendants @@ -312,6 +322,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: @@ -376,7 +395,7 @@ components: Created: description: Created content: - text/plain: + application/json: schema: type: string example: my-resource diff --git a/cps-rest/docs/openapi/cpsData.yml b/cps-rest/docs/openapi/cpsData.yml index d13c285817..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,8 +102,9 @@ 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/contentTypeHeader' + - $ref: 'components.yml#/components/parameters/contentTypeInHeader' requestBody: required: true content: @@ -112,7 +122,6 @@ nodesByDataspaceAndAnchor: examples: dataSample: $ref: 'components.yml#/components/examples/dataSampleXml' - responses: '201': $ref: 'components.yml#/components/responses/Created' @@ -137,7 +146,7 @@ nodesByDataspaceAndAnchor: - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' - $ref: 'components.yml#/components/parameters/observedTimestampInQuery' - - $ref: 'components.yml#/components/parameters/contentTypeHeader' + - $ref: 'components.yml#/components/parameters/contentTypeInHeader' requestBody: required: true content: @@ -197,15 +206,24 @@ nodesByDataspaceAndAnchor: - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' - $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: '200': $ref: 'components.yml#/components/responses/Ok' diff --git a/cps-rest/docs/openapi/cpsDataV2.yml b/cps-rest/docs/openapi/cpsDataV2.yml index a1433badf6..999c5b2c19 100644 --- a/cps-rest/docs/openapi/cpsDataV2.yml +++ b/cps-rest/docs/openapi/cpsDataV2.yml @@ -28,6 +28,7 @@ nodeByDataspaceAndAnchor: - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' - $ref: 'components.yml#/components/parameters/descendantsInQuery' + - $ref: 'components.yml#/components/parameters/contentTypeInHeader' responses: '200': description: OK @@ -38,6 +39,14 @@ nodeByDataspaceAndAnchor: examples: dataSample: $ref: 'components.yml#/components/examples/dataSample' + application/xml: + schema: + type: object + xml: + name: stores + examples: + dataSample: + $ref: 'components.yml#/components/examples/dataSampleXml' '400': $ref: 'components.yml#/components/responses/BadRequest' '403': @@ -46,7 +55,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 +64,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 +85,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 +93,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/cpsQueryV2.yml b/cps-rest/docs/openapi/cpsQueryV2.yml index 7f0ceff768..9aaa4193c3 100644 --- a/cps-rest/docs/openapi/cpsQueryV2.yml +++ b/cps-rest/docs/openapi/cpsQueryV2.yml @@ -1,5 +1,6 @@ # ============LICENSE_START======================================================= # Copyright (C) 2023 TechMahindra Ltd. +# Modifications Copyright (C) 2023-2024 TechMahindra Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,6 +29,7 @@ nodesByDataspaceAndAnchorAndCpsPath: - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/cpsPathInQuery' - $ref: 'components.yml#/components/parameters/descendantsInQuery' + - $ref: 'components.yml#/components/parameters/contentTypeInHeader' responses: '200': description: OK @@ -38,6 +40,14 @@ nodesByDataspaceAndAnchorAndCpsPath: examples: dataSample: $ref: 'components.yml#/components/examples/dataSample' + application/xml: + schema: + type: object + xml: + name: stores + examples: + dataSample: + $ref: 'components.yml#/components/examples/dataSampleXml' '400': $ref: 'components.yml#/components/responses/BadRequest' '403': 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' |