diff options
author | mpriyank <priyank.maheshwari@est.tech> | 2022-05-20 15:25:15 +0100 |
---|---|---|
committer | mpriyank <priyank.maheshwari@est.tech> | 2022-05-24 14:40:40 +0100 |
commit | 4cf4962b74765a5afe234aa258a9143ea6936f73 (patch) | |
tree | d1c784a7f578015dfd91d6ff63006b6be4d3f01f /cps-ncmp-rest/docs | |
parent | f564bf5b4523ceb04bec6e866aec664ea57726d5 (diff) |
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 <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ncmp-rest/docs')
-rw-r--r-- | cps-ncmp-rest/docs/openapi/components.yaml | 46 |
1 files changed, 46 insertions, 0 deletions
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 |