Commit 8875acfe authored by Piotr Gawron's avatar Piotr Gawron
Browse files

homomultimer information is provided in the API

parent bb00fccf
Pipeline #39002 passed with stage
in 28 minutes and 2 seconds
minerva (16.0.0~alpha.1) stable; urgency=medium
* Small improvement: homomultimer information is provided in API (#1468)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 19 Mar 2021 10:00:00 +0200
minerva (16.0.0~alpha.1) stable; urgency=medium
* Backward incompatibility: deprecated columns in data overlays are no longer
supported (#958)
......
......@@ -213,6 +213,13 @@ public class ElementsRestImpl extends BaseRestImpl {
case "synonyms":
value = element.getSynonyms();
break;
case "homomultimer":
if (element instanceof Species) {
value = ((Species) element).getHomodimer();
} else {
value = null;
}
break;
case "formula":
value = element.getFormula();
break;
......@@ -385,6 +392,7 @@ public class ElementsRestImpl extends BaseRestImpl {
result.add("activity");
result.add("initialAmount");
result.add("glyph");
result.add("homomultimer");
return result;
}
......
......@@ -203,6 +203,10 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.description("is the element hypothetical")
.type("boolean")
.optional(),
fieldWithPath("[].homomultimer")
.description("multimer value")
.type("int")
.optional(),
subsectionWithPath("[].other")
.description("list of oher properties")
.type("object")
......@@ -340,7 +344,7 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
}
@Test
public void testGetAllElementsFiltereByType() throws Exception {
public void testGetAllElementsFilteredByType() throws Exception {
RequestBuilder request = get(
"/projects/{projectId}/models/{mapId}/bioEntities/elements/?columns=name,complexId&type=Protein",
TEST_PROJECT, "*");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment