got rid if Map and added username, password and apikey to request body
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
package com.vaessl.app.dto;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
|
||||
public record ConnectionRequest(
|
||||
@NotBlank(message = "App URL is mandatory") String appUrl,
|
||||
@NotBlank(message = "Service type is mandatory") String serviceType,
|
||||
@NotEmpty(message = "Credentials are mandatory") Map<String, String> credentials,
|
||||
String username,
|
||||
String password,
|
||||
String apiKey,
|
||||
@JsonProperty(defaultValue = "false") Boolean stayLoggedIn) {
|
||||
|
||||
public ConnectionRequest {
|
||||
@@ -18,4 +17,9 @@ public record ConnectionRequest(
|
||||
stayLoggedIn = false;
|
||||
}
|
||||
}
|
||||
|
||||
public ConnectionRequest(String appUrl, String serviceType, String username, String password,
|
||||
Boolean stayLoggedIn) {
|
||||
this(appUrl, serviceType, username, password, null, stayLoggedIn);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user