Skip to content
Snippets Groups Projects
Commit c86fce85 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Merge branch 'malowe/main/api-legacy-fix' into 'main'

Update single mailing list return to be an array

See merge request !17
parents cf598d24 f1fb7708
No related branches found
No related tags found
1 merge request!17Update single mailing list return to be an array
Pipeline #14591 passed
......@@ -73,7 +73,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/MailingList"
$ref: "#/components/schemas/MailingLists"
404:
description: Not found
500:
......
......@@ -11,6 +11,7 @@
**********************************************************************/
package org.eclipsefoundation.mailing.resources;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
......@@ -89,7 +90,7 @@ public class MailingListsResource {
// add count to singular mailing list retrieval
MailingLists ml = mailingLists.get(0);
ml.setCount(dao.count(new RDBMSQuery<>(wrap, filters.get(MailingListSubscriptions.class), params)));
return Response.ok(ml).build();
return Response.ok(Arrays.asList(ml)).build();
}
@GET
......
......@@ -58,7 +58,7 @@ class MailingListsResourceTests {
*/
public static final EndpointTestCase GET_MAILING_LISTS_BY_NAME_SUCCESS = TestCaseHelper
.buildSuccessCase(MAILING_LISTS_BY_NAME_URL, new String[] { "eclipse-dev" },
SchemaNamespaceHelper.MAILING_LIST_SCHEMA_PATH);
SchemaNamespaceHelper.MAILING_LISTS_SCHEMA_PATH);
public static final EndpointTestCase GET_MAILING_LISTS_BY_NAME_INVALID_FORMAT = TestCaseHelper
.buildInvalidFormatCase(MAILING_LISTS_BY_NAME_URL, new String[] { "eclipse-dev" }, ContentType.XML);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment