diff options
Diffstat (limited to 'cps-rest/docs')
-rw-r--r-- | cps-rest/docs/openapi/components.yml | 22 | ||||
-rw-r--r-- | cps-rest/docs/openapi/cpsAdminV2.yml | 74 | ||||
-rw-r--r-- | cps-rest/docs/openapi/openapi.yml | 5 |
3 files changed, 97 insertions, 4 deletions
diff --git a/cps-rest/docs/openapi/components.yml b/cps-rest/docs/openapi/components.yml index 1a7e4308d9..43a311872a 100644 --- a/cps-rest/docs/openapi/components.yml +++ b/cps-rest/docs/openapi/components.yml @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # Copyright (c) 2021-2022 Bell Canada. # Modifications Copyright (C) 2021-2023 Nordix Foundation -# Modifications Copyright (C) 2022-2024 TechMahindra Ltd. +# Modifications Copyright (C) 2022-2025 TechMahindra Ltd. # Modifications Copyright (C) 2022 Deutsche Telekom AG # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -157,7 +157,12 @@ components: name: "Funny" target-data: name: "Comic" - + NotificationSubscriptionsDataSample: + value: + cps-notification-subscriptions:dataspaces: + dataspace: + - name: dataspace01 + - name: dataspace02 parameters: dataspaceNameInQuery: name: dataspace-name @@ -236,6 +241,19 @@ components: value: /shops/bookstore list attributes xpath: value: /shops/bookstore/categories[@code=1] + notificationSubscriptionXpathInQuery: + name: xpath + in: query + description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html + required: true + schema: + type: string + default: /dataspaces + examples: + subscription by dataspace xpath: + value: /dataspaces/dataspace[@name='dataspace01'] + subscription by anchor xpath: + value: /dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01'] requiredXpathInQuery: name: xpath in: query diff --git a/cps-rest/docs/openapi/cpsAdminV2.yml b/cps-rest/docs/openapi/cpsAdminV2.yml index e501ad8b15..af2572a1f0 100644 --- a/cps-rest/docs/openapi/cpsAdminV2.yml +++ b/cps-rest/docs/openapi/cpsAdminV2.yml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2022 TechMahindra Ltd. +# Copyright (C) 2022-2025 TechMahindra Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -87,3 +87,75 @@ schemaSet: $ref: 'components.yml#/components/responses/Conflict' '500': $ref: 'components.yml#/components/responses/InternalServerError' + +notificationSubscription: + get: + description: Get cps notification subscription + tags: + - cps-admin + summary: Get cps notification subscription + operationId: getNotificationSubscription + parameters: + - $ref: 'components.yml#/components/parameters/notificationSubscriptionXpathInQuery' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: 'components.yml#/components/examples/NotificationSubscriptionsDataSample' + '400': + $ref: 'components.yml#/components/responses/BadRequest' + '403': + $ref: 'components.yml#/components/responses/Forbidden' + '409': + $ref: 'components.yml#/components/responses/Conflict' + '500': + $ref: 'components.yml#/components/responses/InternalServerError' + post: + description: Create cps notification subscription + tags: + - cps-admin + summary: Create cps notification subscription + operationId: createNotificationSubscription + parameters: + - $ref: 'components.yml#/components/parameters/notificationSubscriptionXpathInQuery' + requestBody: + required: true + content: + application/json: + schema: + type: object + examples: + dataSample: + $ref: 'components.yml#/components/examples/NotificationSubscriptionsDataSample' + responses: + '201': + $ref: 'components.yml#/components/responses/CreatedV2' + '400': + $ref: 'components.yml#/components/responses/BadRequest' + '403': + $ref: 'components.yml#/components/responses/Forbidden' + '409': + $ref: 'components.yml#/components/responses/Conflict' + '500': + $ref: 'components.yml#/components/responses/InternalServerError' + delete: + description: Delete cps notification subscription + tags: + - cps-admin + summary: Delete cps notification subscription + operationId: deleteNotificationSubscription + parameters: + - $ref: 'components.yml#/components/parameters/notificationSubscriptionXpathInQuery' + responses: + '204': + $ref: 'components.yml#/components/responses/NoContent' + '400': + $ref: 'components.yml#/components/responses/BadRequest' + '403': + $ref: 'components.yml#/components/responses/Forbidden' + '409': + $ref: 'components.yml#/components/responses/Conflict' + '500': + $ref: 'components.yml#/components/responses/InternalServerError'
\ No newline at end of file diff --git a/cps-rest/docs/openapi/openapi.yml b/cps-rest/docs/openapi/openapi.yml index c85bf7cac7..09c454b1da 100644 --- a/cps-rest/docs/openapi/openapi.yml +++ b/cps-rest/docs/openapi/openapi.yml @@ -2,7 +2,7 @@ # Copyright (C) 2021-2025 Nordix Foundation # Modifications Copyright (C) 2021 Pantheon.tech # Modifications Copyright (C) 2021 Bell Canada. -# Modifications Copyright (C) 2022-2024 TechMahindra Ltd. +# Modifications Copyright (C) 2022-2025 TechMahindra Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -115,5 +115,8 @@ paths: /v2/dataspaces/{dataspace-name}/nodes/query: $ref: 'cpsQueryV2.yml#/nodesByDataspaceAndCpsPath' + /v2/notification-subscription: + $ref: 'cpsAdminV2.yml#/notificationSubscription' + security: - basicAuth: [] |