From 12672b1d6f3b7c6229cc683b370c5652697e8a30 Mon Sep 17 00:00:00 2001 From: chenkins Date: Mon, 26 Aug 2024 16:36:35 +0200 Subject: [PATCH] Fix openapi api response content for unlock. --- .../src/main/java/org/cryptomator/hub/api/VaultResource.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/org/cryptomator/hub/api/VaultResource.java b/backend/src/main/java/org/cryptomator/hub/api/VaultResource.java index 41fcb20e..ffd76610 100644 --- a/backend/src/main/java/org/cryptomator/hub/api/VaultResource.java +++ b/backend/src/main/java/org/cryptomator/hub/api/VaultResource.java @@ -51,6 +51,8 @@ import org.eclipse.microprofile.jwt.JsonWebToken; import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.enums.ParameterIn; +import org.eclipse.microprofile.openapi.annotations.media.Content; +import org.eclipse.microprofile.openapi.annotations.media.Schema; import org.eclipse.microprofile.openapi.annotations.parameters.Parameter; import org.eclipse.microprofile.openapi.annotations.responses.APIResponse; @@ -293,7 +295,7 @@ public Response legacyUnlock(@PathParam("vaultId") UUID vaultId, @PathParam("dev @VaultRole({VaultAccess.Role.MEMBER, VaultAccess.Role.OWNER}) // may throw 403 @Transactional @Operation(summary = "get the user-specific vault key", description = "retrieves a jwe containing the vault key, encrypted for the current user") - @APIResponse(responseCode = "200") + @APIResponse(responseCode = "200", content = {@Content(mediaType = MediaType.TEXT_PLAIN, schema = @Schema(implementation = String.class))}) @APIResponse(responseCode = "402", description = "license expired or number of effective vault users that have a token exceeds available license seats") @APIResponse(responseCode = "403", description = "not a vault member") @APIResponse(responseCode = "404", description = "unknown vault")