Commit 9b196d1b authored by Piotr Gawron's avatar Piotr Gawron
Browse files

type names normalized

parent 924211b4
......@@ -90,7 +90,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
responseFields(
fieldWithPath("[]")
.description("list of suggested chemical queries")
.type("Array<String>"))))
.type("array<string>"))))
.andExpect(status().is2xxSuccessful())
.andReturn().getResponse().getContentAsString();
......@@ -106,7 +106,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
return responseFields(
subsectionWithPath("[].id")
.description("identifier of the chemical")
.type("Object"),
.type("object"),
fieldWithPath("[].name")
.description("name")
.type("string"),
......@@ -115,31 +115,31 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
.type("string"),
fieldWithPath("[].synonyms")
.description("list of synonyms")
.type("Array<String>"),
.type("array<string>"),
subsectionWithPath("[].references")
.description("list of references")
.type("Array<Reference>"),
.type("array<Reference>"),
fieldWithPath("[].targets")
.description("list of targets")
.type("Array<Target>"),
.type("array<Target>"),
fieldWithPath("[].targets[].name")
.description("target name")
.type("string"),
subsectionWithPath("[].targets[].references")
.description("list of target references")
.type("Array<Reference>"),
.type("array<Reference>"),
subsectionWithPath("[].targets[].targetElements")
.description("list of elements on the map associated with this target")
.type("Array<Object>"),
.type("array<object>"),
subsectionWithPath("[].targets[].targetParticipants")
.description("list of identifiers associated with this target")
.type("Array<Object>"),
.type("array<object>"),
fieldWithPath("[].directEvidence")
.description("direct evidence")
.type("string"),
subsectionWithPath("[].directEvidenceReferences")
.description("list of references")
.type("Array<Reference>"));
.type("array<Reference>"));
}
@Test
......
......@@ -121,7 +121,7 @@ public class CommentControllerIntegrationTest extends ControllerIntegrationTest
return responseFields(
subsectionWithPath("[]")
.description("list of comments")
.type("Array<Comment>")).andWithPrefix("[].", getCommentResponseFields());
.type("array<Comment>")).andWithPrefix("[].", getCommentResponseFields());
}
private List<FieldDescriptor> getCommentResponseFields() {
......@@ -129,23 +129,23 @@ public class CommentControllerIntegrationTest extends ControllerIntegrationTest
fieldWithPath("author")
.description("author name")
.optional()
.type("String"),
.type("string"),
fieldWithPath("owner")
.description("login of the user that created a comment")
.optional()
.type("String"),
.type("string"),
fieldWithPath("email")
.description("author email address")
.optional()
.type("String"),
.type("string"),
fieldWithPath("content")
.description("content")
.optional()
.type("String"),
.type("string"),
fieldWithPath("title")
.description("formatted name of the commented element")
.optional()
.type("String"),
.type("string"),
fieldWithPath("pinned")
.description("should the comment be visible to everybody on the map")
.optional()
......@@ -158,7 +158,7 @@ public class CommentControllerIntegrationTest extends ControllerIntegrationTest
fieldWithPath("removeReason")
.description("reason why comment was removed")
.optional()
.type("String"),
.type("string"),
fieldWithPath("id")
.description("comment identifier")
.optional()
......@@ -170,11 +170,11 @@ public class CommentControllerIntegrationTest extends ControllerIntegrationTest
subsectionWithPath("coord")
.description("coordinates where comment should be pinned")
.optional()
.type("Point"),
.type("point"),
fieldWithPath("icon")
.description("icon that should be used to visualize this comment")
.optional()
.type("String"),
.type("string"),
fieldWithPath("elementId")
.description("element identifier")
.optional()
......@@ -183,7 +183,7 @@ public class CommentControllerIntegrationTest extends ControllerIntegrationTest
.description("type of the element that was commented on. Available options "
+ snippets.getOptionsAsString(ElementIdentifierType.class))
.optional()
.type("String"));
.type("string"));
}
private RequestParametersSnippet getCommentsRequestParameters() {
......
......@@ -96,7 +96,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
.andDo(document("configuration/list_options",
responseFields(subsectionWithPath("[]")
.description("list of options")
.type("Array<Option>")).andWithPrefix("[].", configurationOptionFields())))
.type("array<Option>")).andWithPrefix("[].", configurationOptionFields())))
.andReturn().getResponse().getContentAsString();
......@@ -192,7 +192,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
responseFields(
fieldWithPath("[]")
.description("list of available databases")
.type("Array"),
.type("array"),
fieldWithPath("[].name")
.description("name of the database")
.type("string"))))
......@@ -210,7 +210,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
responseFields(
fieldWithPath("[]")
.description("list of available releases")
.type("Array"),
.type("array"),
fieldWithPath("[].licenseUrl")
.description("url with the content of license used for this release")
.type("string"),
......@@ -342,7 +342,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
.type("string"),
fieldWithPath("elementClassNames")
.description("Java classes that identify bioEntity types that can be annotated by the annotator")
.type("List<String>"),
.type("array<string>"),
fieldWithPath("description")
.description("short description of the annotator")
.type("string")
......@@ -350,7 +350,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
fieldWithPath("parameters")
.description(
"list of supported input fields, generated outputs that can be filled by annotator and configuration options")
.type("List<Object>")));
.type("array<object>")));
result.addAll(annotatorParameterFields("parameters[]."));
return result;
......@@ -438,7 +438,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
.optional(),
fieldWithPath("registryIdentifier")
.description("list of uris used by this identifier type")
.type("Array<String>")
.type("array<string>")
.optional()));
}
......@@ -535,34 +535,34 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
.optional(),
fieldWithPath(prefix + "field")
.description("bioEntity field. Either this or 'annotation_type' is required for INPUT/OUTPUT parameter")
.type("String")
.type("string")
.optional(),
fieldWithPath(prefix + "commonName")
.description("name of the CONFIG parameter")
.type("String")
.type("string")
.optional(),
fieldWithPath(prefix + "description")
.description("description of the parameter")
.type("String")
.type("string")
.optional(),
fieldWithPath(prefix + "inputType")
.description("type of the CONFIG parameter")
.type("String")
.type("string")
.optional(),
fieldWithPath(prefix + "name")
.description("name of the CONFIG parameter")
.type("String")
.type("string")
.optional(),
fieldWithPath(prefix + "value")
.description("default value of the CONFIG parameter")
.type("String")
.type("string")
.optional(),
fieldWithPath(prefix + "order")
.description("order position when listing parameters")
.type("number"),
fieldWithPath(prefix + "type")
.description("type of parameter (INPUT/OUTPUT/CONFIG)")
.type("String"));
.type("string"));
return result;
}
......
......@@ -130,16 +130,16 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
responseFields(
fieldWithPath("inputs")
.description("list of available input formats")
.type("Array"),
.type("array"),
fieldWithPath("inputs[].available_names")
.description("list of names that could be used for specific format")
.type("Array<String>"),
.type("array<string>"),
fieldWithPath("outputs")
.description("list of available input formats")
.type("Array"),
.type("array"),
fieldWithPath("outputs[].available_names")
.description("list of names that could be used for specific format")
.type("Array<String>"))));
.type("array<string>"))));
}
@Test
......@@ -171,16 +171,16 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
responseFields(
fieldWithPath("inputs")
.description("list of available input formats")
.type("Array"),
.type("array"),
fieldWithPath("inputs[].available_names")
.description("list of names that could be used for specific format")
.type("Array<String>"),
.type("array<string>"),
fieldWithPath("outputs")
.description("list of available input formats")
.type("Array"),
.type("array"),
fieldWithPath("outputs[].available_names")
.description("list of names that could be used for specific format")
.type("Array<String>"))));
.type("array<string>"))));
}
@Test
......
......@@ -106,7 +106,7 @@ public class DrugControllerIntegrationTest extends ControllerIntegrationTest {
responseFields(
fieldWithPath("[]")
.description("list of suggested drug queries")
.type("Array<String>"))))
.type("array<string>"))))
.andExpect(status().is2xxSuccessful());
}
......@@ -125,7 +125,7 @@ public class DrugControllerIntegrationTest extends ControllerIntegrationTest {
return responseFields(
subsectionWithPath("[].id")
.description("identifier of the chemical")
.type("Object"),
.type("object"),
fieldWithPath("[].name")
.description("name")
.type("string"),
......@@ -134,31 +134,31 @@ public class DrugControllerIntegrationTest extends ControllerIntegrationTest {
.type("string"),
fieldWithPath("[].synonyms")
.description("list of synonyms")
.type("Array<String>"),
.type("array<string>"),
fieldWithPath("[].brandNames")
.description("list of brand names")
.type("Array<String>"),
.type("array<string>"),
fieldWithPath("[].bloodBrainBarrier")
.description("does drug cross blood brain barrier")
.type("String"),
.type("string"),
subsectionWithPath("[].references")
.description("list of references")
.type("Array<Reference>"),
.type("array<Reference>"),
fieldWithPath("[].targets")
.description("list of targets")
.type("Array<Target>"),
.type("array<Target>"),
fieldWithPath("[].targets[].name")
.description("target name")
.type("string"),
subsectionWithPath("[].targets[].references")
.description("list of target references")
.type("Array<Reference>"),
.type("array<Reference>"),
subsectionWithPath("[].targets[].targetElements")
.description("list of elements on the map associated with this target")
.type("Array<Object>"),
.type("array<object>"),
subsectionWithPath("[].targets[].targetParticipants")
.description("list of identifiers associated with this target")
.type("Array<Object>"));
.type("array<object>"));
}
}
......@@ -142,19 +142,19 @@ public class FileControllerIntegrationTest extends ControllerIntegrationTest {
return Arrays.asList(
fieldWithPath("id")
.description("unique id in the system")
.type("Number"),
.type("number"),
fieldWithPath("filename")
.description("original name of the file")
.type("Number"),
.type("number"),
fieldWithPath("length")
.description("file length")
.type("Number"),
.type("number"),
fieldWithPath("owner")
.description("login of the file owner")
.type("Number"),
.type("number"),
fieldWithPath("uploadedDataLength")
.description("total number of uploaded bytes")
.type("Number"));
.type("number"));
}
}
......@@ -118,7 +118,7 @@ public class FunctionControllerIntegrationTest extends ControllerIntegrationTest
.type("string"),
fieldWithPath("arguments")
.description("list of function parameters")
.type("Array<Object>"));
.type("array<object>"));
}
private ResponseFieldsSnippet listOfFunctionFields() {
......
......@@ -77,7 +77,7 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
.andDo(document("genomics/get_organisms",
responseFields(fieldWithPath("[]")
.description("list of organisms")
.type("Array")).andWithPrefix("[].", organismResponseFields())))
.type("array")).andWithPrefix("[].", organismResponseFields())))
.andExpect(status().is2xxSuccessful())
.andReturn().getResponse().getContentAsString();
......@@ -92,7 +92,7 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
return Arrays.asList(
fieldWithPath("resource")
.description("taxonomy id of the organism")
.type("String"),
.type("string"),
fieldWithPath("annotatorClassName").ignored(),
fieldWithPath("id").ignored(),
fieldWithPath("link").ignored(),
......@@ -110,10 +110,10 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
responseFields(
fieldWithPath("[]")
.description("list of genome types")
.type("Array"),
.type("array"),
fieldWithPath("[].type")
.description("type")
.type("String"))))
.type("string"))))
.andExpect(status().is2xxSuccessful());
}
......@@ -132,10 +132,10 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
responseFields(
fieldWithPath("[]")
.description("list of genome versions")
.type("Array"),
.type("array"),
fieldWithPath("[].version")
.description("version")
.type("String"))))
.type("string"))))
.andExpect(status().is2xxSuccessful());
}
......@@ -156,10 +156,10 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
responseFields(
fieldWithPath("[]")
.description("list of urls")
.type("Array"),
.type("array"),
fieldWithPath("[].url")
.description("url")
.type("String"))))
.type("string"))))
.andExpect(status().is2xxSuccessful());
}
......@@ -208,7 +208,7 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
.andDo(document("genomics/get_genomes",
responseFields(fieldWithPath("[]")
.description("list of downloaded genomes")
.type("Array")).andWithPrefix("[].", genomeInformationResponseFields())))
.type("array")).andWithPrefix("[].", genomeInformationResponseFields())))
.andExpect(status().is2xxSuccessful())
.andReturn().getResponse().getContentAsString();
......@@ -253,25 +253,25 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
private List<FieldDescriptor> genomeInformationResponseFields() {
return Arrays.asList(fieldWithPath("downloadProgress")
.description("download progress (0-100%)")
.type("Double"),
.type("double"),
fieldWithPath("geneMapping")
.description("list of available gene mappings for given genome")
.type("Array"),
.type("array"),
fieldWithPath("idObject")
.description("unique id of genome in minerva")
.type("Number"),
.type("number"),
fieldWithPath("localUrl")
.description("url on minerva where local copy of genome can be accessed")
.type("String"),
.type("string"),
fieldWithPath("organism")
.description("organism identifier")
.type("Object"),
.type("object"),
fieldWithPath("organism.resource")
.description("organism identifier")
.type("String"),
.type("string"),
fieldWithPath("organism.type")
.description("organism identifier type (usually " + MiriamType.TAXONOMY + ")")
.type("String"),
.type("string"),
fieldWithPath("organism.annotatorClassName")
.ignored(),
fieldWithPath("organism.id")
......@@ -280,13 +280,13 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
.ignored(),
fieldWithPath("sourceUrl")
.description("genome source url")
.type("String"),
.type("string"),
fieldWithPath("type")
.description("type of genome (database from which it was downloaded)")
.type("String"),
.type("string"),
fieldWithPath("version")
.description("genome version")
.type("String"));
.type("string"));
}
@Test
......
......@@ -141,7 +141,7 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.optional(),
subsectionWithPath("[].bounds")
.description("coordinates and the dimension of the element on the map")
.type("Object")
.type("object")
.optional(),
fieldWithPath("[].hierarchyVisibilityLevel")
.description("at what zoom level this element becomes visible in hierarchical view")
......@@ -153,15 +153,15 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.optional(),
subsectionWithPath("[].synonyms")
.description("list of synonyms")
.type("Array<String>")
.type("array<string>")
.optional(),
subsectionWithPath("[].formerSymbols")
.description("list of former symbols")
.type("Array<String>")
.type("array<string>")
.optional(),
subsectionWithPath("[].references")
.description("list of references")
.type("Array<Reference>")
.type("array<Reference>")
.optional(),
fieldWithPath("[].notes")
.description("notes and description")
......@@ -205,7 +205,7 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.optional(),
subsectionWithPath("[].other")
.description("list of oher properties")
.type("Object")
.type("object")
.optional());
}
......@@ -229,11 +229,11 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.optional(),
subsectionWithPath("[].centerPoint")
.description("center point")
.type("Point")
.type("point")
.optional(),
subsectionWithPath("[].lines")
.description("list of lines used to draw reaction")
.type("Array<Line>")
.type("array<line>")
.optional(),
fieldWithPath("[].hierarchyVisibilityLevel")
.description("at what zoom level this element becomes visible in hierarchical view")
......@@ -241,19 +241,19 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.optional(),
subsectionWithPath("[].references")
.description("list of references")
.type("Array<Reference>")
.type("array<Reference>")
.optional(),
subsectionWithPath("[].modifiers")
.description("list of modifiers")
.type("Array<Object>")
.type("array<object>")
.optional(),
subsectionWithPath("[].reactants")
.description("list of reactants")
.type("Array<Object>")
.type("array<object>")
.optional(),
subsectionWithPath("[].products")
.description("list of products")
.type("Array<Object>")
.type("array<object>")
.optional(),
fieldWithPath("[].notes")
.description("notes and description")
......@@ -261,11 +261,11 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.optional(),
fieldWithPath("[].kineticLaw")
.description("SBML kinetics law")
.type("Object")
.type("object")
.optional(),
subsectionWithPath("[].other")
.description("list of oher properties")
.type("Object")
.type("object")
.optional());
}
......@@ -527,7 +527,7 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
responseFields(
fieldWithPath("[]")
.description("list of all full search queries that could be used for quering the map")
.type("Array<String>"))))
.type("array<string>"))))
.andExpect(status().is2xxSuccessful());
}
......@@ -569,10 +569,10 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
fieldWithPath("minZoom").description("minimum zoom level availbale for the map").type("number"),
fieldWithPath("maxZoom").description("maximum zoom level available for the map").type("number"),
fieldWithPath("submodelType").description("type of the submap").type("string"),
fieldWithPath("authors").description("list of authors").type("Array<Author>"),
fieldWithPath("references").description("list of references").type("Array<Reference>"),
fieldWithPath("authors").description("list of authors").type("array<Author>"),
fieldWithPath("references").description("list of references").type("array<Reference>"),
fieldWithPath("creationDate").description("creation date").type("timestamp"),
fieldWithPath("modificationDates").description("modification dates").type("Array<timestamp>"));
fieldWithPath("modificationDates").description("modification dates").type("array<timestamp>"));
}