From 8d82de01c17ccb96429d7edf40f5e54f9053bbc4 Mon Sep 17 00:00:00 2001 From: Sakshi Bobade Date: Thu, 13 Jul 2023 16:36:40 +0530 Subject: [PATCH 1/2] Updating the swagger w/ datasetcopy api --- plugins/zlux-agent/doc/swagger/fileapi.yaml | 36 ++++++++++++++++++++- test/yaml-loader/defaults.yaml | 2 ++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/plugins/zlux-agent/doc/swagger/fileapi.yaml b/plugins/zlux-agent/doc/swagger/fileapi.yaml index 3d75535e..dfe84eae 100644 --- a/plugins/zlux-agent/doc/swagger/fileapi.yaml +++ b/plugins/zlux-agent/doc/swagger/fileapi.yaml @@ -330,7 +330,41 @@ paths: Member membername could not be deleted DYNALLOC failure: DYNALLOC failed with RC = rc, DYN RC = rc, RSN = rsn, dsn={dataset}, (site) - + + '/datasetCopy/{dataset}': + post: + summary: Copy a dataset and paste as a new one + tags: + - Dataset + parameters: + - name: newDataset + in: query + description: Name of the new dataset created after copy operation + required: true + type: string + produces: + - application/json + responses: + '201': + description: Successfully Copied Dataset + schema: + type: string + '400': + description: Invalid dataset path + schema: + type: string + examples: + Invalid dataset path: + Source dataset does not exist + '500': + description: Internal Server Error + schema: + type: string + examples: + DD Allocation Error: + Unable to allocate a DD for ACB + Unalloc error: + "error: ds unalloc dsn={dataset} dd=ddname, rc=rc sysRC=rc, sysRSN=rsn" '/VSAMdatasetContents/{dataset}': get: summary: Get a VSAM dataset diff --git a/test/yaml-loader/defaults.yaml b/test/yaml-loader/defaults.yaml index b48bf376..875a7343 100644 --- a/test/yaml-loader/defaults.yaml +++ b/test/yaml-loader/defaults.yaml @@ -95,6 +95,8 @@ components: method: '*' - url: '/datasetContents' method: '*' + - url: '/datasetCopy' + method: '*' - url: '/jes' method: '*' - url: '/VSAMdatasetContents' From 9aa47783ee511cf88100e892a89cc1bdb85c741d Mon Sep 17 00:00:00 2001 From: Sakshi Bobade Date: Fri, 14 Jul 2023 14:47:20 +0530 Subject: [PATCH 2/2] Udating the swagger doc --- plugins/zlux-agent/doc/swagger/fileapi.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/zlux-agent/doc/swagger/fileapi.yaml b/plugins/zlux-agent/doc/swagger/fileapi.yaml index dfe84eae..c9eabd97 100644 --- a/plugins/zlux-agent/doc/swagger/fileapi.yaml +++ b/plugins/zlux-agent/doc/swagger/fileapi.yaml @@ -330,16 +330,20 @@ paths: Member membername could not be deleted DYNALLOC failure: DYNALLOC failed with RC = rc, DYN RC = rc, RSN = rsn, dsn={dataset}, (site) - '/datasetCopy/{dataset}': post: summary: Copy a dataset and paste as a new one tags: - Dataset parameters: + - name: dataset + in: path + description: Source dataset name + required: true + type: string - name: newDataset in: query - description: Name of the new dataset created after copy operation + description: Target dataset name required: true type: string produces: