Rename `RedeemReceiptRequest` to help openapi

This commit is contained in:
Ravi Khadiwala 2024-04-16 10:51:05 -05:00 committed by ravi-signal
parent 1df824db7c
commit 2046b02bd8
1 changed files with 5 additions and 5 deletions

View File

@ -121,9 +121,9 @@ public class ArchiveController {
.thenApply(Util.ASYNC_EMPTY_RESPONSE); .thenApply(Util.ASYNC_EMPTY_RESPONSE);
} }
public record RedeemReceiptRequest( public record RedeemBackupReceiptRequest(
@Schema(description = "Presentation of a ZK receipt encoded in standard padded base64", implementation = String.class) @Schema(description = "Presentation of a ZK receipt encoded in standard padded base64", implementation = String.class)
@JsonDeserialize(using = RedeemReceiptRequest.Deserializer.class) @JsonDeserialize(using = RedeemBackupReceiptRequest.Deserializer.class)
@NotNull @NotNull
ReceiptCredentialPresentation receiptCredentialPresentation) { ReceiptCredentialPresentation receiptCredentialPresentation) {
@ -150,7 +150,7 @@ public class ArchiveController {
description = """ description = """
Redeem a receipt acquired from /v1/subscription/{subscriberId}/receipt_credentials to mark the account as Redeem a receipt acquired from /v1/subscription/{subscriberId}/receipt_credentials to mark the account as
eligible for the paid backup tier. eligible for the paid backup tier.
After successful redemption, subsequent requests to /v1/archive/auth will return credentials with the level on After successful redemption, subsequent requests to /v1/archive/auth will return credentials with the level on
the provided receipt until the expiration time on the receipt. the provided receipt until the expiration time on the receipt.
""") """)
@ -159,10 +159,10 @@ public class ArchiveController {
@ApiResponse(responseCode = "429", description = "Rate limited.") @ApiResponse(responseCode = "429", description = "Rate limited.")
public CompletionStage<Response> redeemReceipt( public CompletionStage<Response> redeemReceipt(
@Mutable @Auth final AuthenticatedAccount account, @Mutable @Auth final AuthenticatedAccount account,
@Valid @NotNull final RedeemReceiptRequest redeemReceiptRequest) { @Valid @NotNull final RedeemBackupReceiptRequest redeemBackupReceiptRequest) {
return this.backupAuthManager.redeemReceipt( return this.backupAuthManager.redeemReceipt(
account.getAccount(), account.getAccount(),
redeemReceiptRequest.receiptCredentialPresentation()) redeemBackupReceiptRequest.receiptCredentialPresentation())
.thenApply(Util.ASYNC_EMPTY_RESPONSE); .thenApply(Util.ASYNC_EMPTY_RESPONSE);
} }