-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INJIMOB-2260] revert responseWrapper change with manual setters (#501)
Signed-off-by: KiruthikaJeyashankar <[email protected]>
- Loading branch information
1 parent
68ac3fe
commit 8d1fea2
Showing
2 changed files
with
8 additions
and
15 deletions.
There are no files selected for viewing
21 changes: 7 additions & 14 deletions
21
src/main/java/io/mosip/mimoto/core/http/ResponseWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
package io.mosip.mimoto.core.http; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
|
||
import io.mosip.mimoto.dto.ErrorDTO; | ||
import lombok.*; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
public class ResponseWrapper<T> { | ||
@NotNull | ||
@Valid | ||
private T response; | ||
private List<ErrorDTO> errors = new ArrayList<>(); | ||
|
||
public void setResponse(T response) { | ||
this.response = response; | ||
this.errors = null; | ||
} | ||
|
||
public void setErrors(List<ErrorDTO> errors) { | ||
this.errors = errors; | ||
this.response = null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ | |
"vcDownloadPoolInterval": "6000", | ||
"issuer": "residentapp" | ||
}, | ||
"errors": null | ||
"errors": [] | ||
} |