From e9ed581de0a6090c513e6fca0052b69396cb3cc8 Mon Sep 17 00:00:00 2001 From: kissand Date: Thu, 12 May 2022 15:59:18 +0200 Subject: Merge 2 'query' end points in NCMP - merge two endpoint for a same backend - use xPath query instead of sql query - modify searches endpoint to return a cmHandle object with all public properties - handle old (deprecated) queries - handle public property queries - create useful examples - use more verbose error messages - simplify openapi yamls - create new query service - change second endpoint name to a better matched name - modify legacy tests with new requirements - create new tests for the new scenarios Issue-ID: CPS-1016 Change-Id: I7476e9dbd510ec93b5b48ce85d477ecb2dadffff Signed-off-by: kissand --- cps-ncmp-rest/docs/openapi/ncmp.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'cps-ncmp-rest/docs/openapi/ncmp.yml') diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml index 318e6e66d..7a894f519 100755 --- a/cps-ncmp-rest/docs/openapi/ncmp.yml +++ b/cps-ncmp-rest/docs/openapi/ncmp.yml @@ -246,26 +246,28 @@ fetchModuleReferencesByCmHandle: 500: $ref: 'components.yaml#/components/responses/InternalServerError' -executeCmHandleSearch: +searchCmHandles: post: - description: Execute cm handle searches using 'hasAllModules' condition to get all cm handles for the given module names + description: Execute cm handle query search, to be included in the result a cm-handle must fulfill ALL the conditions listed here tags: - network-cm-proxy summary: Execute cm handle search using the available conditions - operationId: executeCmHandleSearch + operationId: searchCmHandles requestBody: required: true content: application/json: schema: - $ref: 'components.yaml#/components/schemas/Conditions' + $ref: 'components.yaml#/components/schemas/CmHandleQueryParameters' responses: 200: description: OK content: application/json: schema: - $ref: 'components.yaml#/components/schemas/CmHandles' + type: array + items: + $ref: 'components.yaml#/components/schemas/RestOutputCmHandle' 400: $ref: 'components.yaml#/components/responses/BadRequest' 401: @@ -317,19 +319,19 @@ getCmHandlePropertiesById: 500: $ref: 'components.yaml#/components/responses/InternalServerError' -queryCmHandles: +searchCmHandleIds: post: - description: Execute cm handle query search + description: Execute cm handle query search, to be included in the result a cm-handle must fulfill ALL the conditions listed here tags: - network-cm-proxy summary: Execute cm handle query upon a given set of query parameters - operationId: queryCmHandles + operationId: searchCmHandleIds requestBody: required: true content: application/json: schema: - $ref: 'components.yaml#/components/schemas/CmHandleQueryRestParameters' + $ref: 'components.yaml#/components/schemas/CmHandleQueryParameters' responses: 200: description: OK -- cgit 1.2.3-korg