From 92869fc9a938bd5c0754ba4e85550d959d8a2c93 Mon Sep 17 00:00:00 2001 From: Sean-DNAstack Date: Mon, 23 Oct 2023 10:57:36 -0400 Subject: [PATCH] Clean up wes swagger yaml --- .../wes/cromwell/CromwellService.java | 4 +- workflow_execution_service.swagger.yaml | 83 +++++++++++++------ 2 files changed, 60 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/dnastack/wes/cromwell/CromwellService.java b/src/main/java/com/dnastack/wes/cromwell/CromwellService.java index 7d6a935..b065521 100644 --- a/src/main/java/com/dnastack/wes/cromwell/CromwellService.java +++ b/src/main/java/com/dnastack/wes/cromwell/CromwellService.java @@ -231,7 +231,7 @@ public RunId cancel(String runId) { * * @return a list of generated files for the run */ - public RunFiles getRunFiles(String runId) throws NotFoundException { + public RunFiles getRunFiles(String runId) { CromwellMetadataResponse metadataResponse = getMetadata(runId); Set finalFileSet = new HashSet<>(); Set secondaryFileSet = new HashSet<>(); @@ -554,7 +554,7 @@ private void extractSecondaryLogFilesFromCall(Set secondaryFileSet, Set< } CromwellMetadataResponse subWorkflowMetadata = call.getSubWorkflowMetadata(); if (subWorkflowMetadata != null) { - extractSecondaryLogFiles(secondaryFileSet,logFileSet,subWorkflowMetadata); + extractSecondaryLogFiles(secondaryFileSet, logFileSet, subWorkflowMetadata); } } diff --git a/workflow_execution_service.swagger.yaml b/workflow_execution_service.swagger.yaml index b8244e9..a2e297f 100644 --- a/workflow_execution_service.swagger.yaml +++ b/workflow_execution_service.swagger.yaml @@ -383,7 +383,7 @@ paths: description: >- This endpoint provides all the generated files from the associated storage client for a workflow run. The returned result has information about the - files of the given run and the type of the given file. + files of the given run, including the path and the type of the given file. x-swagger-router-controller: ga4gh.wes.server operationId: GetRunFiles responses: @@ -434,12 +434,12 @@ paths: files are cleaned up. When true the delete operation will be done asynchronously with faster execution but higher risk of not doing a "clean" cleanup. x-swagger-router-controller: ga4gh.wes.server - operationId: GetRunFiles + operationId: DeleteRunFiles responses: '200': description: '' schema: - $ref: '#/definitions/RunId' + $ref: '#/definitions/RunFileDeletions' '401': description: The request is unauthorized. schema: @@ -653,27 +653,21 @@ definitions: - CANCELING: The task was canceled by the user, and is in the process of stopping. - File: - type: object - properties: - type: - type: string - enum: - - FINAL - - SECONDARY - - LOG - default: FINAL - description: >- - - FINAL: The file exists directly as an output of the metadata response for the specified run. - - - SECONDARY: The file exists as a part of a task call output or a sub-workflow metadata - response for the specified run - - - LOG: The file exists as a part of the backend logs or stderr and stdout for the workflow or - sub-workflow metadata for the specified run. - path: - type: string - description: The path of the file. + FileType: + type: string + enum: + - FINAL + - SECONDARY + - LOG + default: FINAL + description: >- + - FINAL: The file exists directly as an output of the metadata response for the specified run. + + - SECONDARY: The file exists as a part of a task call output or a sub-workflow metadata + response for the specified run + + - LOG: The file exists as a part of the backend logs or stderr and stdout for the workflow or + sub-workflow metadata for the specified run. RunListResponse: type: object properties: @@ -782,7 +776,46 @@ definitions: files: type: array items: - $ref: '#/definitions/File' + $ref: '#/definitions/RunFile' + RunFile: + type: object + properties: + file_type: + $ref: '#/definitions/FileType' + path: + type: string + description: The path of the file. + RunFileDeletions: + type: object + required: + - run_id + properties: + deletions: + type: array + items: + $ref: '#/definitions/RunFileDeletion' + RunFileDeletion: + type: object + properties: + path: + type: string + description: The path of the file. + file_type: + $ref: '#/definitions/FileType' + state: + type: string + enum: + - DELETED + - ASYNC + - FAILED + description: >- + - DELETED: The file has been successfully deleted from storage. + + + - ASYNC: The file is being deleted asynchronously. + + + - FAILED: An error occurred during the process of deleting the file. WorkflowTypeVersion: type: object properties: