mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 16:58:04 +01:00
Fix swagger oneof annotations
This commit is contained in:
committed by
Jon Chambers
parent
d865cec2a4
commit
8be43566a4
@@ -14,8 +14,4 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@JsonSubTypes.Type(value = RemoteAttachment.class, name = "success"),
|
||||
@JsonSubTypes.Type(value = RemoteAttachmentError.class, name = "error"),
|
||||
})
|
||||
@Schema(description = """
|
||||
The location of the transfer archive if the archive was successfully uploaded, otherwise a error indicating that
|
||||
the upload has failed and the destination device should stop waiting
|
||||
""", oneOf = {RemoteAttachmentError.class, RemoteAttachment.class})
|
||||
public sealed interface TransferArchiveResult permits RemoteAttachment, RemoteAttachmentError {}
|
||||
|
||||
@@ -25,4 +25,8 @@ public record TransferArchiveUploadedRequest(
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@Schema(description = """
|
||||
The location of the transfer archive if the archive was successfully uploaded, otherwise a error indicating that
|
||||
the upload has failed and the destination device should stop waiting
|
||||
""", oneOf = {RemoteAttachment.class, RemoteAttachmentError.class})
|
||||
TransferArchiveResult transferArchive) {}
|
||||
|
||||
Reference in New Issue
Block a user