diff --git a/pom.xml b/pom.xml index 1c1e897fc11b896c8ed46d8441a64ca317f30980..5315c56012a49be3e7a9fb84ec27a13fcb999b8e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,11 +12,11 @@ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> - <quarkus.platform.version>2.6.3.Final</quarkus.platform.version> + <quarkus.platform.version>2.11.2.Final</quarkus.platform.version> <surefire-plugin.version>3.0.0-M5</surefire-plugin.version> <auto-value.version>1.8.2</auto-value.version> <hibernate.version>5.5.6.Final</hibernate.version> - <eclipse-api-version>0.6.5</eclipse-api-version> + <eclipse-api-version>0.6.10</eclipse-api-version> <fdndb-api-version>1.0-SNAPSHOT</fdndb-api-version> </properties> <repositories> diff --git a/src/main/java/org/eclipsefoundation/wg/resource/WorkingGroupsResource.java b/src/main/java/org/eclipsefoundation/wg/resource/WorkingGroupsResource.java index 83cd6a1d972118ee5ae4ed8bbc3e323a9fb1a7b5..66efabd56a0780a624e0b514f4421c00c77c8b40 100644 --- a/src/main/java/org/eclipsefoundation/wg/resource/WorkingGroupsResource.java +++ b/src/main/java/org/eclipsefoundation/wg/resource/WorkingGroupsResource.java @@ -34,7 +34,7 @@ import org.eclipsefoundation.wg.services.WorkingGroupsService; * * @author Martin Lowe, Zachary Sabourin */ -@Path("working-groups") +@Path("") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class WorkingGroupsResource { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 3d46e6f0816e2becd2610285791e804843f1ffeb..33e77b45ec107bce8e95f52fc8d7f70a609e6bb9 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,3 +1,5 @@ +quarkus.http.root-path=/working-groups + fdndb-api/mp-rest/url=http://localhost:8095 fdndb-api/mp-rest/scope=javax.inject.Singleton diff --git a/src/test/java/org/eclipsefoundation/wg/resource/WorkingGroupsResourceTest.java b/src/test/java/org/eclipsefoundation/wg/resource/WorkingGroupsResourceTest.java index 65ca90ecd296d0a01624539689f5e416d649d755..562197b2c06b60ccab33b04f190e7ede943bc662 100644 --- a/src/test/java/org/eclipsefoundation/wg/resource/WorkingGroupsResourceTest.java +++ b/src/test/java/org/eclipsefoundation/wg/resource/WorkingGroupsResourceTest.java @@ -23,7 +23,7 @@ import io.restassured.http.ContentType; @QuarkusTest class WorkingGroupsResourceTest { - public final static String WGS_BASE_URL = "/working-groups"; + public final static String WGS_BASE_URL = ""; public final static String WG_STATUS_URL = WGS_BASE_URL + "?status={param}"; public final static String WG_STATUSES_URL = WGS_BASE_URL + "?status={param1}&status={param2}"; @@ -37,65 +37,71 @@ class WorkingGroupsResourceTest { /* * GET_ALL */ - public final static EndpointTestCase GET_ALL_SUCCESS = TestCaseHelper.buildSuccessCase(WGS_BASE_URL, - new String[] {}, SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); + public final static EndpointTestCase GET_ALL_SUCCESS = TestCaseHelper + .buildSuccessCase(WGS_BASE_URL, new String[] {}, SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); - public final static EndpointTestCase GET_ALL_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase(WGS_BASE_URL, - new String[] {}, ContentType.TEXT); + public final static EndpointTestCase GET_ALL_INVALID_FORMAT = TestCaseHelper + .buildInvalidFormatCase(WGS_BASE_URL, new String[] {}, ContentType.TEXT); - public final static EndpointTestCase GET_ALL_SINGLE_STATUS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_STATUS_URL, - new String[] { "active" }, SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); + public final static EndpointTestCase GET_ALL_SINGLE_STATUS_SUCCESS = TestCaseHelper + .buildSuccessCase(WG_STATUS_URL, new String[] { "active" }, + SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); - public final static EndpointTestCase GET_ALL_MULTI_STATUS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_STATUSES_URL, - new String[] { "active", "archived" }, SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); + public final static EndpointTestCase GET_ALL_MULTI_STATUS_SUCCESS = TestCaseHelper + .buildSuccessCase(WG_STATUSES_URL, new String[] { "active", "archived" }, + SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); /* * GET_BY_ALIAS */ - public final static EndpointTestCase GET_BY_ALIAS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_BASE_URL, - new String[] { "awful-group" }, SchemaNamespaceHelper.WORKING_GROUP_SCHEMA_PATH); + public final static EndpointTestCase GET_BY_ALIAS_SUCCESS = TestCaseHelper + .buildSuccessCase(WG_BASE_URL, new String[] { "awful-group" }, + SchemaNamespaceHelper.WORKING_GROUP_SCHEMA_PATH); - public final static EndpointTestCase GET_BY_ALIAS_INVALID_ALIAS = TestCaseHelper.buildNotFoundCase(WG_BASE_URL, - new String[] { "invalid-Group" }); + public final static EndpointTestCase GET_BY_ALIAS_INVALID_ALIAS = TestCaseHelper + .buildNotFoundCase(WG_BASE_URL, new String[] { "invalid-Group" }, null); - public final static EndpointTestCase GET_BY_ALIAS_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase( - WG_BASE_URL, new String[] { "important-group" }, ContentType.TEXT); + public final static EndpointTestCase GET_BY_ALIAS_INVALID_FORMAT = TestCaseHelper + .buildInvalidFormatCase(WG_BASE_URL, new String[] { "important-group" }, ContentType.TEXT); /* * GET_RESOURCES */ - public final static EndpointTestCase GET_RESOURCES_SUCCESS = TestCaseHelper.buildSuccessCase(WG_RESOURCES_URL, - new String[] { "important-group" }, SchemaNamespaceHelper.WORKING_GROUP_RESOURCES_SCHEMA_PATH); + public final static EndpointTestCase GET_RESOURCES_SUCCESS = TestCaseHelper + .buildSuccessCase(WG_RESOURCES_URL, new String[] { "important-group" }, + SchemaNamespaceHelper.WORKING_GROUP_RESOURCES_SCHEMA_PATH); - public final static EndpointTestCase GET_RESOURCES_INVALID_ALIAS = TestCaseHelper.buildNotFoundCase( - WG_RESOURCES_URL, new String[] { "invalid-Group" }); + public final static EndpointTestCase GET_RESOURCES_INVALID_ALIAS = TestCaseHelper + .buildNotFoundCase(WG_RESOURCES_URL, new String[] { "invalid-Group" }, null); - public final static EndpointTestCase GET_RESOURCES_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase( - WG_RESOURCES_URL, new String[] { "mediocre-group " }, ContentType.TEXT); + public final static EndpointTestCase GET_RESOURCES_INVALID_FORMAT = TestCaseHelper + .buildInvalidFormatCase(WG_RESOURCES_URL, new String[] { "mediocre-group " }, ContentType.TEXT); /* * GET_LEVELS */ - public final static EndpointTestCase GET_LEVELS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_LEVELS_URL, - new String[] { "mediocre-group" }, SchemaNamespaceHelper.WORKING_GROUP_LEVELS_SCHEMA_PATH); + public final static EndpointTestCase GET_LEVELS_SUCCESS = TestCaseHelper + .buildSuccessCase(WG_LEVELS_URL, new String[] { "mediocre-group" }, + SchemaNamespaceHelper.WORKING_GROUP_LEVELS_SCHEMA_PATH); - public final static EndpointTestCase GET_LEVELS_INVALID_ALIAS = TestCaseHelper.buildNotFoundCase(WG_LEVELS_URL, - new String[] { "invalid-Group" }); + public final static EndpointTestCase GET_LEVELS_INVALID_ALIAS = TestCaseHelper + .buildNotFoundCase(WG_LEVELS_URL, new String[] { "invalid-Group" }, null); - public final static EndpointTestCase GET_LEVELS_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase( - WG_LEVELS_URL, new String[] { "mediocre-group " }, ContentType.TEXT); + public final static EndpointTestCase GET_LEVELS_INVALID_FORMAT = TestCaseHelper + .buildInvalidFormatCase(WG_LEVELS_URL, new String[] { "mediocre-group " }, ContentType.TEXT); /* * GET_AGREEMENTS */ - public final static EndpointTestCase GET_AGREEMENTS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_AGREEMENTS_URL, - new String[] { "important-group" }, SchemaNamespaceHelper.WORKING_GROUP_AGREEMENT_SCHEMA_PATH); + public final static EndpointTestCase GET_AGREEMENTS_SUCCESS = TestCaseHelper + .buildSuccessCase(WG_AGREEMENTS_URL, new String[] { "important-group" }, + SchemaNamespaceHelper.WORKING_GROUP_AGREEMENT_SCHEMA_PATH); - public final static EndpointTestCase GET_AGREEMENTS_INVALID_ALIAS = TestCaseHelper.buildNotFoundCase( - WG_AGREEMENTS_URL, new String[] { "invalid-Group" }); + public final static EndpointTestCase GET_AGREEMENTS_INVALID_ALIAS = TestCaseHelper + .buildNotFoundCase(WG_AGREEMENTS_URL, new String[] { "invalid-Group" }, null); - public final static EndpointTestCase GET_AGREEMENTS_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase( - WG_AGREEMENTS_URL, new String[] { "important-group" }, ContentType.TEXT); + public final static EndpointTestCase GET_AGREEMENTS_INVALID_FORMAT = TestCaseHelper + .buildInvalidFormatCase(WG_AGREEMENTS_URL, new String[] { "important-group" }, ContentType.TEXT); @Test void getAll_success() {