I'm trying to mimic Spring Data REST's APIs in cases where SDR isn't a good fit, such as a login or password reset route. I have this DTO
public class PasswordCredential implements
AuthenticationProvider<UsernamePasswordAuthenticationToken> {
@Email
@NotNull
@NotEmpty
private final String user;
@NotNull
@NotEmpty
private final CharSequence pass;
@JsonCreator
public PasswordCredential(
@Nullable @JsonProperty( value = "user", access = JsonProperty.Access.WRITE_ONLY ) String user,
@Nullable @JsonProperty( value = "pass", access = JsonProperty.Access.WRITE_ONLY ) CharSequence pass
) {
this.user = user;
this.pass = pass;
}
I would like to convert it to a JsonSchema
so that I can return it as SDR would. How can I accomplish this?