From deac4777c1a245be1dc4c423658523b41071b110 Mon Sep 17 00:00:00 2001 From: JosephKeenan Date: Mon, 28 Mar 2022 12:26:07 +0100 Subject: Query based on Public CM Properties -Updated OpenAPI for new Endpoint -Will replace SQL with CPSPathQuery once investigation is complete -Functionality in place to determine if public properties match - -Added Unit and CSIT tests - small modifications may need to be made -CSIT tests enhanced to add additional nodes and tests Issue-ID: CPS-731 Change-Id: I403e603ce79c4a4a6994d51b459b5703510d5a83 Signed-off-by: DylanB95EST Signed-off-by: JosephKeenan --- cps-ncmp-rest/docs/openapi/components.yaml | 10 ++++++++++ cps-ncmp-rest/docs/openapi/ncmp.yml | 27 +++++++++++++++++++++++++++ cps-ncmp-rest/docs/openapi/openapi.yml | 5 ++++- 3 files changed, 41 insertions(+), 1 deletion(-) (limited to 'cps-ncmp-rest/docs') diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml index 247fabd02..a7955c19f 100644 --- a/cps-ncmp-rest/docs/openapi/components.yaml +++ b/cps-ncmp-rest/docs/openapi/components.yaml @@ -211,6 +211,16 @@ components: type: string example: my-module-revision + CmHandleQueryRestParameters: + type: object + title: Cm Handle query parameters for executing cm handle search + properties: + publicCmHandleProperties: + type: object + additionalProperties: + type: string + example: Book Type + RestOutputCmHandle: type: object title: CM handle Details diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml index 03ed98a0e..05e4b8485 100755 --- a/cps-ncmp-rest/docs/openapi/ncmp.yml +++ b/cps-ncmp-rest/docs/openapi/ncmp.yml @@ -291,6 +291,33 @@ retrieveCmHandleDetailsById: application/json: schema: $ref: 'components.yaml#/components/schemas/RestOutputCmHandle' + 404: + $ref: 'components.yaml#/components/responses/NotFound' + 500: + $ref: 'components.yaml#/components/responses/InternalServerError' + +queryCmHandles: + post: + description: Execute cm handle query search + tags: + - network-cm-proxy + summary: Execute cm handle query upon a given set of query parameters + operationId: queryCmHandles + requestBody: + required: true + content: + application/json: + schema: + $ref: 'components.yaml#/components/schemas/CmHandleQueryRestParameters' + responses: + 200: + description: OK + content: + application/json: + schema: + type: array + items: + type: string 400: $ref: 'components.yaml#/components/responses/BadRequest' 401: diff --git a/cps-ncmp-rest/docs/openapi/openapi.yml b/cps-ncmp-rest/docs/openapi/openapi.yml index 12a8318ef..935b657e1 100755 --- a/cps-ncmp-rest/docs/openapi/openapi.yml +++ b/cps-ncmp-rest/docs/openapi/openapi.yml @@ -39,4 +39,7 @@ paths: $ref: 'ncmp.yml#/executeCmHandleSearch' /v1/ch/{cm-handle}: - $ref: 'ncmp.yml#/retrieveCmHandleDetailsById' \ No newline at end of file + $ref: 'ncmp.yml#/retrieveCmHandleDetailsById' + + /v1/data/ch/searches: + $ref: 'ncmp.yml#/queryCmHandles' -- cgit 1.2.3-korg