I have the following ApiModel for my endpoint -
public class CreateConfigRequest {
@ApiModelProperty(example = "hive")
String entityType;
@ApiModelProperty(example = "imports")
String entityNamespace;
@ApiModelProperty(example = "hotel")
String entityName;
@ApiModelProperty(example = "{\"name\": \"hotel\", \"batch\": {\"type\": \"FullScan\"}}")
JobConfig content;
}
Where JobConfig is another pojo class. Code below :
@Data
public class JobConfig {
@NonNull private String name;
@NonNull private BatchSpec batch;
private ProfileConfig profile;
private ValidateConfig validate;
private ActionConfig action;
}
Which is basically the structure of the POJO.
How it should look like -
Basically i am looking to understand how i can set it to a default JSON structure.