Commit 41c1f1ba authored by Piotr Gawron's avatar Piotr Gawron
Browse files

api endpoints were exposed without api prefix

parent e78d2313
minerva (16.1.0~alpha.0) stable; urgency=medium
* Bug fix: api endpoints were exposed without 'api' prefix
minerva (16.0.0~beta.1) stable; urgency=medium
* Backward incompatibility: layout parameter in minerva url is not supported
anymore
......
......@@ -23,7 +23,7 @@ import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IConfigurationService;
@RestController
@RequestMapping(value = "/configuration", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/configuration", produces = MediaType.APPLICATION_JSON_VALUE)
public class ConfigurationController extends BaseController {
Logger logger = LogManager.getLogger();
......
......@@ -20,7 +20,7 @@ import lcsb.mapviewer.model.map.InconsistentModelException;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/convert", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/convert", produces = MediaType.APPLICATION_JSON_VALUE)
public class ConvertController extends BaseController {
@SuppressWarnings("unused")
private Logger logger = LogManager.getLogger();
......
......@@ -15,7 +15,7 @@ import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IUserService;
@RestController
@RequestMapping(value = "/files", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/files", produces = MediaType.APPLICATION_JSON_VALUE)
public class FileController extends BaseController {
private FileRestImpl fileRest;
......
......@@ -16,7 +16,7 @@ import lcsb.mapviewer.services.ObjectNotFoundException;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/genomics", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/genomics", produces = MediaType.APPLICATION_JSON_VALUE)
public class ReferenceGenomeController extends BaseController {
private ReferenceGenomeRestImpl referenceGenomeController;
......
......@@ -13,7 +13,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.ObjectNotFoundException;
@RestController
@RequestMapping(value = "/mesh", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/mesh", produces = MediaType.APPLICATION_JSON_VALUE)
public class MeshController extends BaseController {
/**
* Default class logger.
......
......@@ -25,7 +25,7 @@ import lcsb.mapviewer.model.user.ConfigurationElementType;
import lcsb.mapviewer.services.interfaces.IConfigurationService;
@RestController
@RequestMapping("/minervanet")
@RequestMapping("/api/minervanet")
public class MinervaNetController extends BaseController {
private Logger logger = LogManager.getLogger();
......
......@@ -17,7 +17,7 @@ import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IUserService;
@RestController
@RequestMapping(value = "/plugins", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/plugins", produces = MediaType.APPLICATION_JSON_VALUE)
public class PluginController extends BaseController {
/**
* Default class logger.
......
......@@ -27,7 +27,7 @@ import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IUserService;
@RestController
@RequestMapping(value = "/projects", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects", produces = MediaType.APPLICATION_JSON_VALUE)
public class ProjectController extends BaseController {
private ServletContext context;
......
......@@ -13,7 +13,7 @@ import lcsb.mapviewer.services.ObjectNotFoundException;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects", produces = MediaType.APPLICATION_JSON_VALUE)
public class ChemicalController extends BaseController {
private ChemicalRestImpl chemicalController;
......
......@@ -23,7 +23,7 @@ import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IUserService;
@RestController
@RequestMapping(value = "/projects/{projectId}/comments", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/comments", produces = MediaType.APPLICATION_JSON_VALUE)
public class CommentController extends BaseController {
Logger logger = LogManager.getLogger();
......
......@@ -13,7 +13,7 @@ import lcsb.mapviewer.services.ObjectNotFoundException;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects/{projectId}/", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/", produces = MediaType.APPLICATION_JSON_VALUE)
public class DrugController extends BaseController {
private DrugRestImpl drugController;
......
......@@ -13,7 +13,7 @@ import lcsb.mapviewer.services.ObjectNotFoundException;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects/{projectId}/", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/", produces = MediaType.APPLICATION_JSON_VALUE)
public class MiRnaController extends BaseController {
private MiRnaRestImpl miRnaController;
......
......@@ -31,7 +31,7 @@ import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IUserService;
@RestController
@RequestMapping(value = "/projects/{projectId:.+}/models", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId:.+}/models", produces = MediaType.APPLICATION_JSON_VALUE)
public class ModelController extends BaseController {
Logger logger = LogManager.getLogger();
......
......@@ -12,7 +12,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects/{projectId}/models/{modelId}/", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/models/{modelId}/", produces = MediaType.APPLICATION_JSON_VALUE)
public class BioEntitiesController extends BaseController {
private BioEntitiesRestImpl bioEntitiesRestImpl;
......
......@@ -12,7 +12,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects/{projectId}/models/{modelId}/bioEntities/elements", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/models/{modelId}/bioEntities/elements", produces = MediaType.APPLICATION_JSON_VALUE)
public class ElementsController extends BaseController {
private ElementsRestImpl projectController;
......
......@@ -11,7 +11,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping("/projects/{projectId}/models/{modelId}/bioEntities/reactions")
@RequestMapping("/api/projects/{projectId}/models/{modelId}/bioEntities/reactions")
public class ReactionsController extends BaseController {
private ReactionsRestImpl reactionController;
......
......@@ -12,7 +12,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects/{projectId}/models/{modelId}/functions", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/models/{modelId}/functions", produces = MediaType.APPLICATION_JSON_VALUE)
public class FunctionsController extends BaseController {
private FunctionsRestImpl functionController;
......
......@@ -12,7 +12,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects/{projectId}/models/{modelId}/parameters", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/models/{modelId}/parameters", produces = MediaType.APPLICATION_JSON_VALUE)
public class ParametersController extends BaseController {
private ParametersRestImpl parameterController;
......
......@@ -11,7 +11,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects/{projectId}/models/{modelId}/publications", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/models/{modelId}/publications", produces = MediaType.APPLICATION_JSON_VALUE)
public class PublicationsController extends BaseController {
private PublicationsRestImpl projectController;
......
......@@ -12,7 +12,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.QueryException;
@RestController
@RequestMapping(value = "/projects/{projectId}/models/{modelId}/units", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/models/{modelId}/units", produces = MediaType.APPLICATION_JSON_VALUE)
public class UnitsController extends BaseController {
private UnitsRestImpl unitController;
......
......@@ -22,7 +22,7 @@ import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IUserService;
@RestController
@RequestMapping(value = "/projects/{projectId}/overlays", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/projects/{projectId}/overlays", produces = MediaType.APPLICATION_JSON_VALUE)
public class OverlayController extends BaseController {
Logger logger = LogManager.getLogger();
......
......@@ -13,7 +13,7 @@ import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.services.ObjectNotFoundException;
@RestController
@RequestMapping(value = "/taxonomy", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/taxonomy", produces = MediaType.APPLICATION_JSON_VALUE)
public class TaxonomyController extends BaseController {
/**
* Default class logger.
......
......@@ -22,7 +22,7 @@ import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IUserService;
@RestController
@RequestMapping( produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE)
public class UserController extends BaseController {
Logger logger = LogManager.getLogger();
......
......@@ -70,7 +70,7 @@ public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServlet
@Override
protected String[] getServletMappings() {
return new String[] { "/", "/api/*" };
return new String[] { "/"};
}
@Override
......
......@@ -147,7 +147,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("name", "TEST-admin"),
new BasicNameValuePair("surname", ""),
new BasicNameValuePair("email", "ewa.smula@uni.lu"))));
RequestBuilder request = post("/users/" + TEST_ADMIN_1_USER)
RequestBuilder request = post("/api/users/" + TEST_ADMIN_1_USER)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......@@ -165,7 +165,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("name", "TEST-general"),
new BasicNameValuePair("surname", ""),
new BasicNameValuePair("email", "ewa.smula@uni.lu"))));
RequestBuilder request = post("/users/" + TEST_ADMIN_2_USER)
RequestBuilder request = post("/api/users/" + TEST_ADMIN_2_USER)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......@@ -183,7 +183,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("name", "TEST-curator"),
new BasicNameValuePair("surname", ""),
new BasicNameValuePair("email", "ewa.smula@uni.lu"))));
RequestBuilder request = post("/users/" + TEST_CURATOR_USER)
RequestBuilder request = post("/api/users/" + TEST_CURATOR_USER)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......@@ -201,7 +201,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("name", "TEST-curator"),
new BasicNameValuePair("surname", ""),
new BasicNameValuePair("email", "ewa.smula@uni.lu"))));
RequestBuilder request = post("/users/" + TEST_USER_CAN_CREATE_OVERLAYS_USER)
RequestBuilder request = post("/api/users/" + TEST_USER_CAN_CREATE_OVERLAYS_USER)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......@@ -219,7 +219,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("name", "TEST-user"),
new BasicNameValuePair("surname", ""),
new BasicNameValuePair("email", "ewa.smula@uni.lu"))));
RequestBuilder request = post("/users/" + TEST_USER)
RequestBuilder request = post("/api/users/" + TEST_USER)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......@@ -231,7 +231,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
private void grantPrivilege(String userLogin, PrivilegeType privilege) throws Exception {
String body = "{\"privileges\":{\"" + privilege + "\":true}}";
RequestBuilder request = patch("/users/" + userLogin + ":updatePrivileges")
RequestBuilder request = patch("/api/users/" + userLogin + ":updatePrivileges")
.content(body)
.session(session);
......@@ -303,7 +303,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
+ "\"login\":\"" + userLogin + "\""
+ "}]";
request = patch("/projects/{projectId}:grantPrivileges", projectId)
request = patch("/api/projects/{projectId}:grantPrivileges", projectId)
.content(body)
.session(session);
mockMvc.perform(request).andExpect(status().is2xxSuccessful());
......@@ -348,7 +348,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("zip-entries[3][_data][root]", "true"),
new BasicNameValuePair("zip-entries[3][_data][name]", "single"))));
RequestBuilder request = post("/projects/{projectId}/", projectId)
RequestBuilder request = post("/api/projects/{projectId}/", projectId)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......@@ -378,7 +378,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("verify-annotations", "false"),
new BasicNameValuePair("semantic-zoom", "false"))));
RequestBuilder request = post("/projects/{projectId}/", TEST_SBGNML_MAP_PROJECT)
RequestBuilder request = post("/api/projects/{projectId}/", TEST_SBGNML_MAP_PROJECT)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......@@ -440,7 +440,7 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("zip-entries[8][_data][root]", "true"),
new BasicNameValuePair("zip-entries[8][_data][name]", "MainMap"))));
RequestBuilder request = post("/projects/{projectId}/", TEST_ADVANCED_MAP_PROJECT)
RequestBuilder request = post("/api/projects/{projectId}/", TEST_ADVANCED_MAP_PROJECT)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......
......@@ -60,7 +60,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
public void testSearchChemicalsInProjectUrl() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = get("/projects/{projectId}/chemicals:search?query=stilbene oxide", TEST_PROJECT)
RequestBuilder request = get("/api/projects/{projectId}/chemicals:search?query=stilbene oxide", TEST_PROJECT)
.session(session);
mockMvc.perform(request)
......@@ -80,7 +80,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
project.setDisease(bloodLossDisease);
projectService.updateProject(project);
RequestBuilder request = get("/projects/{projectId}/chemicals/suggestedQueryList", TEST_PROJECT2)
RequestBuilder request = get("/api/projects/{projectId}/chemicals/suggestedQueryList", TEST_PROJECT2)
.session(session);
String content = mockMvc.perform(request)
......@@ -145,7 +145,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
public void testSearchChemicalsInAsteriskProjectId() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = get("/projects/*/chemicals:search?query=xyz")
RequestBuilder request = get("/api/projects/*/chemicals:search?query=xyz")
.session(session);
mockMvc.perform(request)
......@@ -156,7 +156,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
public void testSearchChemicalsByTargetInAsteriskProjectId() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = get("/projects/*/chemicals:search?target=ALIAS:xyz")
RequestBuilder request = get("/api/projects/*/chemicals:search?target=ALIAS:xyz")
.session(session);
mockMvc.perform(request)
......@@ -174,7 +174,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
}
}
RequestBuilder request = get("/projects/{projectId}/chemicals:search?target=ALIAS:{aliasId}",
RequestBuilder request = get("/api/projects/{projectId}/chemicals:search?target=ALIAS:{aliasId}",
TEST_PROJECT,
element.getId())
.session(session);
......@@ -187,7 +187,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
public void testgGetSuggestedList() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = get("/projects/{projectId}/chemicals/suggestedQueryList", BUILT_IN_PROJECT)
RequestBuilder request = get("/api/projects/{projectId}/chemicals/suggestedQueryList", BUILT_IN_PROJECT)
.session(session);
mockMvc.perform(request)
......@@ -198,7 +198,7 @@ public class ChemicalControllerIntegrationTest extends ControllerIntegrationTest
public void testgGetSuggestedListForUndefinedProject() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = get("/projects/*/chemicals/suggestedQueryList")
RequestBuilder request = get("/api/projects/*/chemicals/suggestedQueryList")
.session(session);
mockMvc.perform(request)
......
......@@ -70,7 +70,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
data.put("option", option);
String body = new Gson().toJson(data);
RequestBuilder request = patch("/configuration/options/" + ConfigurationElementType.EMAIL_SMTP_PORT.name())
RequestBuilder request = patch("/api/configuration/options/" + ConfigurationElementType.EMAIL_SMTP_PORT.name())
.content(body)
.session(session);
......@@ -80,7 +80,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
@Test
public void accessConfigurationAsAnonymous() throws Exception {
RequestBuilder request = get("/configuration/");
RequestBuilder request = get("/api/configuration/");
mockMvc.perform(request)
.andDo(document("configuration/details",
......@@ -90,7 +90,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
@Test
public void accessConfigurationOptionsAsAnonymous() throws Exception {
RequestBuilder request = get("/configuration/options/");
RequestBuilder request = get("/api/configuration/options/");
String response = mockMvc.perform(request)
.andExpect(status().is2xxSuccessful())
......@@ -120,7 +120,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
data.put("option", option);
String body = new Gson().toJson(data);
RequestBuilder request = patch("/configuration/options/{option}", ConfigurationElementType.EMAIL_SMTP_PORT.name())
RequestBuilder request = patch("/api/configuration/options/{option}", ConfigurationElementType.EMAIL_SMTP_PORT.name())
.content(body)
.session(session);
......@@ -138,7 +138,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
public void accessConfigurationOptionsAsAdmin() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = get("/configuration/options/").session(session);
RequestBuilder request = get("/api/configuration/options/").session(session);
String response = mockMvc.perform(request)
.andExpect(status().is2xxSuccessful()).andReturn().getResponse().getContentAsString();
......@@ -164,7 +164,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
data.put("option", option);
String body = new Gson().toJson(data);
RequestBuilder request = patch("/configuration/options/" + ConfigurationElementType.EMAIL_SMTP_PORT.name())
RequestBuilder request = patch("/api/configuration/options/" + ConfigurationElementType.EMAIL_SMTP_PORT.name())
.content(body)
.session(session);
......@@ -174,7 +174,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
@Test
public void getDapiConfiguration() throws Exception {
RequestBuilder request = get("/configuration/dapi/");
RequestBuilder request = get("/api/configuration/dapi/");
mockMvc.perform(request)
.andDo(document("configuration/dapi/details",
......@@ -186,7 +186,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
@Test
public void getDapiDatabasesConfiguration() throws Exception {
RequestBuilder request = get("/configuration/dapi/database/");
RequestBuilder request = get("/api/configuration/dapi/database/");
mockMvc.perform(request)
.andDo(document("configuration/dapi/list_database",
......@@ -203,7 +203,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
@Test
public void getDapiDrugBankReleaseConfiguration() throws Exception {
assumeTrue("DAPI credentials are not provided", isDapiConfigurationAvailable());
RequestBuilder request = get("/configuration/dapi/database/{database}/release/", "DrugBank");
RequestBuilder request = get("/api/configuration/dapi/database/{database}/release/", "DrugBank");
mockMvc.perform(request)
.andDo(document("configuration/dapi/list_release",
......@@ -229,7 +229,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
@Test
public void acceptLicenseReleaseWithoutAccess() throws Exception {
RequestBuilder request = post("/configuration/dapi/database/{database}/release/{release}:acceptLicense", "DrugBank",
RequestBuilder request = post("/api/configuration/dapi/database/{database}/release/{release}:acceptLicense", "DrugBank",
"5.1");
mockMvc.perform(request)
......@@ -241,7 +241,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
assumeTrue("DAPI credentials are not provided", isDapiConfigurationAvailable());
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = post("/configuration/dapi/database/{database}/release/{release}:acceptLicense", "DrugBank",
RequestBuilder request = post("/api/configuration/dapi/database/{database}/release/{release}:acceptLicense", "DrugBank",
"5.1").session(session);
mockMvc.perform(request)
......@@ -257,7 +257,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
assumeFalse("DAPI credentials are provided", isDapiConfigurationAvailable());
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = post("/configuration/dapi/database/{database}/release/{release}:acceptLicense", "DrugBank",
RequestBuilder request = post("/api/configuration/dapi/database/{database}/release/{release}:acceptLicense", "DrugBank",
"5.1").session(session);
mockMvc.perform(request)
......@@ -273,7 +273,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
user.setPassword("admin");
user.setEmail("piotr.gawron@uni.lu");
RequestBuilder request = post("/configuration/dapi:registerUser")
RequestBuilder request = post("/api/configuration/dapi:registerUser")
.content(new ObjectMapper().writeValueAsString(user))
.contentType(MediaType.APPLICATION_JSON)
.session(session);
......
......@@ -150,7 +150,7 @@ abstract public class ControllerIntegrationTest {
.operationPreprocessors()
.withResponseDefaults(Preprocessors.prettyPrint())
.and()
.uris().withHost("minerva-service.lcsb.uni.lu/minerva/api").withPort(443).withScheme("https")
.uris().withHost("minerva-service.lcsb.uni.lu/minerva").withPort(443).withScheme("https")
.and().snippets().withDefaults(
new CustomCurlRequestSnippet(null, new CommandFormatterWithReplacingPostFilenameHeader(" \\%n ")),
CliDocumentation.httpieRequest(),
......
......@@ -43,7 +43,7 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
@Test
public void testConvertInvalidFile() throws Exception {
String body = "invalid content";
RequestBuilder request = post("/convert/image/SBGN-ML:svg")
RequestBuilder request = post("/api/convert/image/SBGN-ML:svg")
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body);
......@@ -60,7 +60,7 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
while ((line = br.readLine()) != null) {
tmp.append(line + System.getProperty("line.separator"));
}
RequestBuilder request = post("/convert/image/SBGN-ML:svg")
RequestBuilder request = post("/api/convert/image/SBGN-ML:svg")
.content(tmp.toString().getBytes("UTF-8")).characterEncoding("UTF-8");
br.close();
......@@ -71,7 +71,7 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
@Test
public void testConvertInvalidMapFormat() throws Exception {
String body = "invalid content";
RequestBuilder request = post("/convert/image/unknown:svg")
RequestBuilder request = post("/api/convert/image/unknown:svg")
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body);
......@@ -82,7 +82,7 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
@Test
public void testMergeCellDesignerMaps() throws Exception {
byte[] body = Files.readAllBytes(new File("src/test/resources/convert/cd-maps.zip").toPath());
RequestBuilder request = post("/convert/merge/{inputFormat}:{outputFormat}", "CellDesigner_SBML",
RequestBuilder request = post("/api/convert/merge/{inputFormat}:{outputFormat}", "CellDesigner_SBML",
"CellDesigner_SBML")
.header("post-filename", "maps.zip")
.content(body);
......@@ -122,7 +122,7 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
@Test