diff --git a/apps/opik-backend/src/main/java/com/comet/opik/api/ProviderApiKeyUpdate.java b/apps/opik-backend/src/main/java/com/comet/opik/api/ProviderApiKeyUpdate.java index 2591e4743a..7ab82ed52b 100644 --- a/apps/opik-backend/src/main/java/com/comet/opik/api/ProviderApiKeyUpdate.java +++ b/apps/opik-backend/src/main/java/com/comet/opik/api/ProviderApiKeyUpdate.java @@ -7,16 +7,16 @@ import com.fasterxml.jackson.databind.annotation.JsonNaming; import jakarta.validation.constraints.NotBlank; import lombok.Builder; -import lombok.Getter; -import lombok.ToString; @Builder(toBuilder = true) @JsonIgnoreProperties(ignoreUnknown = true) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) -@Getter -public class ProviderApiKeyUpdate { - @ToString.Exclude - @NotBlank - @JsonDeserialize(using = ProviderApiKeyDeserializer.class) - String apiKey; +public record ProviderApiKeyUpdate( + @NotBlank @JsonDeserialize(using = ProviderApiKeyDeserializer.class) String apiKey +){ + + @Override + public String toString() { + return "ProviderApiKeyUpdate{}"; + } } diff --git a/apps/opik-backend/src/main/java/com/comet/opik/domain/LlmProviderApiKeyService.java b/apps/opik-backend/src/main/java/com/comet/opik/domain/LlmProviderApiKeyService.java index 7a0be49362..ce1f69250a 100644 --- a/apps/opik-backend/src/main/java/com/comet/opik/domain/LlmProviderApiKeyService.java +++ b/apps/opik-backend/src/main/java/com/comet/opik/domain/LlmProviderApiKeyService.java @@ -116,7 +116,7 @@ public void updateApiKey(@NonNull UUID id, @NonNull ProviderApiKeyUpdate provide repository.update(providerApiKey.id(), workspaceId, - providerApiKeyUpdate.getApiKey(), + providerApiKeyUpdate.apiKey(), userName); return null;