PAN-52 Fixed issue with the Theorems API

This commit is contained in:
2019-03-21 10:39:24 -06:00
parent 1e15082fcc
commit ba4c7502db
3 changed files with 3 additions and 0 deletions
@@ -21,6 +21,7 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true)
public class Theorem extends BaseDto implements Serializable {
@NotBlank(groups = Insert.class) @Size(min = 1, max = 512, message = "theorem name must be between 1 and 512 characters") private String name;
@NotNull(groups = Insert.class) @Size(min = 1, max = 1024, message = "theorem must be between 1 and 1024 characters") private String theorem;
@NotNull(groups = Insert.class) @Column(name = "theorem_type") private TheoremType theoremType;
@NotNull(groups = Insert.class, message = "a branch of mathematics that this theorem is associated with must be specified") private String branch;
@Type(type = "json") @Column(name = "referenced_definitions", columnDefinition = "jsonb") private List<String> referencedDefinitions;
@@ -352,6 +352,7 @@ public class TheoremControllerTest {
final Theorem theorem = new Theorem();
theorem.setName("Test theorem");
theorem.setTheorem("test theorem thing here");
theorem.setBranch("Test branch");
theorem.setProvenStatus(true);
theorem.setTheoremType(TheoremType.THEOREM);