PAN-52 Fixed issue with the Theorems API
This commit is contained in:
@@ -26,6 +26,7 @@ version int default 1
|
||||
create table theorems (
|
||||
id int not null auto_increment primary key unique,
|
||||
name varchar(512) not null,
|
||||
theorem varchar(1024) not null,
|
||||
theorem_type enum ('THEOREM', 'PROPOSITION', 'LEMMA', 'COROLLARY') not null,
|
||||
branch varchar(512) not null,
|
||||
referenced_definitions json,
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user