aboutsummaryrefslogtreecommitdiffstats
path: root/docs/_static
diff options
context:
space:
mode:
authorputhuparambil.aditya <aditya.puthuparambil@bell.ca>2022-01-10 12:58:37 +0000
committerputhuparambil.aditya <aditya.puthuparambil@bell.ca>2022-01-12 09:45:47 +0000
commitcb23b1771e3fc552090f80791b852ce8ad05f150 (patch)
tree9ff89a6cbb8fcd39ebc1b710d151e8c89717f1ad /docs/_static
parent43a3982feeab703d165788e8871b435fc1ae63d9 (diff)
Support operation field for CPS Temporal Query Output API
- Update in openapi.yaml to support operation field - Repository test updated to test the operation field - Rest api test updated - Updates in documentation to include the operation field Issue-ID: CPS-844 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: If424c273b84b1f415ba706d0956f0841ce9c4196
Diffstat (limited to 'docs/_static')
-rw-r--r--docs/_static/event-schema/cps-data-updated-event-schema.json (renamed from docs/_static/event-schema/cps-data-updated-event-schema-v1.json)14
-rw-r--r--docs/_static/openapi/swagger/openapi.yml19
2 files changed, 27 insertions, 6 deletions
diff --git a/docs/_static/event-schema/cps-data-updated-event-schema-v1.json b/docs/_static/event-schema/cps-data-updated-event-schema.json
index 2057955..94d8db8 100644
--- a/docs/_static/event-schema/cps-data-updated-event-schema-v1.json
+++ b/docs/_static/event-schema/cps-data-updated-event-schema.json
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
- "$id": "urn:cps:org.onap.cps:data-updated-event-schema:v1",
+ "$id": "urn:cps:org.onap.cps:data-updated-event-schema:v2",
"$ref": "#/definitions/CpsDataUpdatedEvent",
@@ -40,7 +40,7 @@
"type",
"content"
],
- "additionalProperties": false
+ "additionalProperties": true
},
"Content": {
@@ -63,6 +63,11 @@
"description": "The name of CPS Core anchor the data is attached to.",
"type": "string"
},
+ "operation": {
+ "description": "The operation on the data",
+ "type": "string",
+ "enum": ["CREATE", "UPDATE", "DELETE"]
+ },
"data": {
"$ref": "#/definitions/Data"
}
@@ -71,10 +76,9 @@
"observedTimestamp",
"dataspaceName",
"schemaSetName",
- "anchorName",
- "data"
+ "anchorName"
],
- "additionalProperties": false
+ "additionalProperties": true
},
"Data": {
diff --git a/docs/_static/openapi/swagger/openapi.yml b/docs/_static/openapi/swagger/openapi.yml
index 991d807..a96947b 100644
--- a/docs/_static/openapi/swagger/openapi.yml
+++ b/docs/_static/openapi/swagger/openapi.yml
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (c) 2021 Bell Canada.
+# Copyright (c) 2021-2022 Bell Canada.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -51,6 +51,7 @@ paths:
required: true
schema:
type: string
+ example: my-anchor
- $ref: '#/components/parameters/observedTimestampAfter'
- $ref: '#/components/parameters/simplePayloadFilter'
- $ref: '#/components/parameters/pointInTime'
@@ -192,18 +193,30 @@ components:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad request error message
+ details: Bad request error details
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized error message
+ details: Unauthorized error details
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Forbidden error message
+ details: Forbidden error details
schemas:
AnchorDetails:
type: object
@@ -212,6 +225,10 @@ components:
observedTimestamp:
type: string
example: '2021-03-21T00:00:00.000-0000'
+ operation:
+ type: string
+ enum: [CREATE, UPDATE, DELETE]
+ example: UPDATE
dataspace:
type: string
example: 'my-dataspace'