From 47b6c96541d2cbadee0c49f5a9c8607429c67a66 Mon Sep 17 00:00:00 2001 From: Sean-DNAstack Date: Tue, 31 Oct 2023 11:19:29 -0400 Subject: [PATCH] Reorganize schemas for swagger --- src/main/java/com/dnastack/wes/api/RunFileDeletion.java | 3 ++- src/main/java/com/dnastack/wes/cromwell/CromwellService.java | 2 +- workflow_execution_service.swagger.yaml | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/dnastack/wes/api/RunFileDeletion.java b/src/main/java/com/dnastack/wes/api/RunFileDeletion.java index 910a733..eca59d5 100644 --- a/src/main/java/com/dnastack/wes/api/RunFileDeletion.java +++ b/src/main/java/com/dnastack/wes/api/RunFileDeletion.java @@ -1,8 +1,9 @@ package com.dnastack.wes.api; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonUnwrapped; -public record RunFileDeletion(@JsonUnwrapped RunFile runFile, DeletionState state, @JsonUnwrapped ErrorResponse errorResponse) { +public record RunFileDeletion(@JsonUnwrapped RunFile runFile, DeletionState state, @JsonProperty("error_response") ErrorResponse errorResponse) { public enum DeletionState { DELETED, diff --git a/src/main/java/com/dnastack/wes/cromwell/CromwellService.java b/src/main/java/com/dnastack/wes/cromwell/CromwellService.java index b065521..8c5f361 100644 --- a/src/main/java/com/dnastack/wes/cromwell/CromwellService.java +++ b/src/main/java/com/dnastack/wes/cromwell/CromwellService.java @@ -280,7 +280,7 @@ public RunFileDeletions deleteRunFiles(String runId, boolean async) { public RunFileDeletion deleteRunFileAsync(RunFile runFile) { CompletableFuture.runAsync(() -> deleteRunFile(runFile), defaultAsyncOperationExecutor); - return new RunFileDeletion(runFile, RunFileDeletion.DeletionState.ASYNC,null); + return new RunFileDeletion(runFile, RunFileDeletion.DeletionState.ASYNC, null); } public RunFileDeletion deleteRunFile(RunFile runFile) { diff --git a/workflow_execution_service.swagger.yaml b/workflow_execution_service.swagger.yaml index a2e297f..f641a3b 100644 --- a/workflow_execution_service.swagger.yaml +++ b/workflow_execution_service.swagger.yaml @@ -816,6 +816,8 @@ definitions: - FAILED: An error occurred during the process of deleting the file. + error_response: + $ref: '#/definitions/ErrorResponse' WorkflowTypeVersion: type: object properties: