MockedMessageDto received in json
This commit is contained in:
@@ -5,6 +5,7 @@ import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Positive;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -18,7 +19,7 @@ import java.util.UUID;
|
||||
@ToString
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MockedMessageDto {
|
||||
public class MockedMessageDto implements Serializable {
|
||||
private UUID clientUUID;
|
||||
@NotNull
|
||||
@Positive
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.release11.klaus.model;
|
||||
|
||||
import com.release11.klaus.model.constraints.HttpCode;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Positive;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* it appears that instance of this class contains info about mocked response
|
||||
* To which UUID it is bound, whats its id, the list of headers, type of content and message body,
|
||||
* as well as status it has to return.
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ToString
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MockedMessageDtoTest implements Serializable {
|
||||
// private UUID clientUUID;
|
||||
@NotNull
|
||||
@Positive
|
||||
private Integer mockedResponseId = 1;
|
||||
private String mediaType = "media";
|
||||
private String messageBody = "clean body";
|
||||
// private Map<String, String> httpHeaders;
|
||||
@HttpCode
|
||||
private Integer httpStatus = 200;
|
||||
|
||||
// public MockedMessageDtoTest(UUID clientUUID) {
|
||||
// this.clientUUID = clientUUID;
|
||||
// }
|
||||
// public MockedMessageDtoTest(UUID clientUUID, Map<String,String> httpHeaders) {
|
||||
// this.clientUUID = clientUUID;
|
||||
// this.httpHeaders = httpHeaders;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -2,10 +2,8 @@ package com.release11.klaus.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@JsonPropertyOrder({ "name", "lastname" })
|
||||
public class TestModel implements Serializable {
|
||||
public class TestModel {
|
||||
private String name = "Jason";
|
||||
private String lastname = "Born";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user