From e557338803286d8aaa0f877aa25d52d18735f309 Mon Sep 17 00:00:00 2001 From: DylanB95EST Date: Thu, 27 Jan 2022 17:12:52 +0000 Subject: Create Endpoint For Get Cm Handles By Name Create endpoint and implement logic for get cm handle details by cm handle name Issue-ID: CPS-817 Change-Id: I83bd2da9219d13fac715a08b19108028ca6f6751 Signed-off-by: DylanB95EST --- cps-ncmp-rest/docs/openapi/components.yaml | 23 ++++++++++++++++++++--- cps-ncmp-rest/docs/openapi/ncmp.yml | 27 +++++++++++++++++++++++++++ cps-ncmp-rest/docs/openapi/openapi.yml | 5 ++++- 3 files changed, 51 insertions(+), 4 deletions(-) (limited to 'cps-ncmp-rest/docs/openapi') diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml index fd02b6e56..d82813b87 100644 --- a/cps-ncmp-rest/docs/openapi/components.yaml +++ b/cps-ncmp-rest/docs/openapi/components.yaml @@ -50,7 +50,7 @@ components: createdCmHandles: type: array items: - $ref: '#/components/schemas/RestCmHandle' + $ref: '#/components/schemas/RestInputCmHandle' updatedCmHandles: type: array example: @@ -64,14 +64,14 @@ components: update-my-property: updated-property delete-my-property: '~' items: - $ref: '#/components/schemas/RestCmHandle' + $ref: '#/components/schemas/RestInputCmHandle' removedCmHandles: type: array items: type: string example: [my-cm-handle1, my-cm-handle2, my-cm-handle3] - RestCmHandle: + RestInputCmHandle: required: - cmHandle type: object @@ -146,6 +146,23 @@ components: type: string example: my-module-revision + RestOutputCmHandle: + type: object + title: CM handle Details + properties: + cmHandle: + type: string + example: my-cm-handle1 + publicCmHandleProperties: + $ref: '#/components/schemas/CmHandlePublicProperties' + CmHandlePublicProperties: + type: array + items: + type: object + additionalProperties: + type: string + example: Book Type + examples: dataSampleRequest: summary: Sample request diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml index 3a71aba80..a267fb491 100755 --- a/cps-ncmp-rest/docs/openapi/ncmp.yml +++ b/cps-ncmp-rest/docs/openapi/ncmp.yml @@ -262,3 +262,30 @@ executeCmHandleSearch: $ref: 'components.yaml#/components/responses/Forbidden' 500: $ref: 'components.yaml#/components/responses/InternalServerError' + +retrieveCmHandleDetailsById: + get: + description: Retrieve CM handle details and properties by cm handle id + tags: + - network-cm-proxy + summary: Retrieve CM handle details + operationId: retrieveCmHandleDetailsById + parameters: + - $ref: 'components.yaml#/components/parameters/cmHandleInPath' + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: 'components.yaml#/components/schemas/RestOutputCmHandle' + 400: + $ref: 'components.yaml#/components/responses/BadRequest' + 401: + $ref: 'components.yaml#/components/responses/Unauthorized' + 403: + $ref: 'components.yaml#/components/responses/Forbidden' + 404: + $ref: 'components.yaml#/components/responses/NotFound' + 500: + $ref: 'components.yaml#/components/responses/InternalServerError' \ No newline at end of file diff --git a/cps-ncmp-rest/docs/openapi/openapi.yml b/cps-ncmp-rest/docs/openapi/openapi.yml index 838a0d08e..12a8318ef 100755 --- a/cps-ncmp-rest/docs/openapi/openapi.yml +++ b/cps-ncmp-rest/docs/openapi/openapi.yml @@ -36,4 +36,7 @@ paths: $ref: 'ncmp.yml#/fetchModuleReferencesByCmHandle' /v1/ch/searches: - $ref: 'ncmp.yml#/executeCmHandleSearch' \ No newline at end of file + $ref: 'ncmp.yml#/executeCmHandleSearch' + + /v1/ch/{cm-handle}: + $ref: 'ncmp.yml#/retrieveCmHandleDetailsById' \ No newline at end of file -- cgit 1.2.3-korg