From 4cf4962b74765a5afe234aa258a9143ea6936f73 Mon Sep 17 00:00:00 2001 From: mpriyank Date: Fri, 20 May 2022 15:25:15 +0100 Subject: Enhanced response with Complex State in API - Introduced RestOutputCmHandleState in API specs of retrieveCmHandleDetailsById - Mapper to map CompositeState to RestOutputCmHandleState - Enhanced existing test cases and introduced new one to test the mapping result Issue-ID: CPS-1047 Change-Id: I34fa198287e5d920bc0cea312ee4e368f3be2b90 Signed-off-by: mpriyank --- cps-ncmp-rest/docs/openapi/components.yaml | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (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 32d25e3951..5fe47e4b0f 100644 --- a/cps-ncmp-rest/docs/openapi/components.yaml +++ b/cps-ncmp-rest/docs/openapi/components.yaml @@ -209,6 +209,8 @@ components: example: my-cm-handle1 publicCmHandleProperties: $ref: '#/components/schemas/CmHandlePublicProperties' + state: + $ref: '#/components/schemas/RestOutputCmHandleState' CmHandlePublicProperties: type: array items: @@ -216,6 +218,50 @@ components: additionalProperties: type: string example: Book Type + RestOutputCmHandleState: + type: object + properties: + cmHandleState: + type: string + example: ADVISED + lockReason: + $ref: '#/components/schemas/lock-reason' + lastUpdateTime: + type: string + example: 2022-12-31T20:30:40.000+0000 + dataSyncEnabled: + type: boolean + example: false + dataSyncState: + $ref: '#/components/schemas/dataStores' + + lock-reason: + type: object + properties: + reason: + type: string + example: LOCKED_OTHER + details: + type: string + example: locked due to module sync + + dataStores: + type: object + properties: + operational: + $ref: '#/components/schemas/sync-state' + running: + $ref: '#/components/schemas/sync-state' + + sync-state: + type: object + properties: + state: + type: string + example: NONE_REQUESTED + lastSyncTime: + type: string + example: 2022-12-31T20:30:40.000+0000 RestOutputCmHandlePublicProperties: type: object -- cgit 1.2.3-korg