Add documentation to challenge controller

This commit is contained in:
ravi-signal
2023-02-24 17:41:15 -06:00
committed by GitHub
parent c3f4956ead
commit b8f363b187
3 changed files with 71 additions and 0 deletions

View File

@@ -5,10 +5,12 @@
package org.whispersystems.textsecuregcm.entities;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotBlank;
public class AnswerPushChallengeRequest extends AnswerChallengeRequest {
@Schema(description = "A token provided to the client via a push payload")
@NotBlank
private String challenge;

View File

@@ -5,13 +5,18 @@
package org.whispersystems.textsecuregcm.entities;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotBlank;
public class AnswerRecaptchaChallengeRequest extends AnswerChallengeRequest {
@Schema(description = "The value of the token field from the server's 428 response")
@NotBlank
private String token;
@Schema(
description = "A string representing a solved captcha",
example = "signal-hcaptcha.30b01b46-d8c9-4c30-bbd7-9719acfe0c10.challenge.abcdefg1345")
@NotBlank
private String captcha;