generated from 2martens/template-service
Modified controller test and related controller to cover object lists better
This commit is contained in:
@ -32,7 +32,7 @@ public class OParlController {
|
||||
|
||||
@GetMapping("/bodies")
|
||||
@Operation(summary = "List of available bodies", description = "returns a list of available bodies in this OParl system")
|
||||
public List<Body> bodies() {
|
||||
public ObjectList<Body> bodies() {
|
||||
log.info("method invoked /v1.1/bodies");
|
||||
return this.service.getBodies();
|
||||
}
|
||||
@ -59,7 +59,7 @@ public class OParlController {
|
||||
|
||||
@GetMapping("/body/{id}/organizations")
|
||||
@Operation(summary = "List of all organizations in body", description = "returns a list of all organizations in requested body")
|
||||
public List<Organization> organizationsInBody(
|
||||
public ObjectList<Organization> organizationsInBody(
|
||||
@PathVariable
|
||||
@Parameter(description = "body ID", example = "0")
|
||||
String id) {
|
||||
@ -79,7 +79,7 @@ public class OParlController {
|
||||
|
||||
@GetMapping("/body/{id}/persons")
|
||||
@Operation(summary = "List of all persons in body", description = "returns a list of all persons in requested body")
|
||||
public List<Person> persons(
|
||||
public ObjectList<Person> persons(
|
||||
@PathVariable
|
||||
@Parameter(description = "body ID", example = "0")
|
||||
String id) {
|
||||
@ -99,7 +99,7 @@ public class OParlController {
|
||||
|
||||
@GetMapping("/body/{id}/memberships")
|
||||
@Operation(summary = "List of all memberships in body", description = "returns a list of all memberships in requested body")
|
||||
public List<Membership> membershipsInBody(
|
||||
public ObjectList<Membership> membershipsInBody(
|
||||
@PathVariable
|
||||
@Parameter(description = "body ID", example = "0")
|
||||
String id) {
|
||||
@ -109,7 +109,7 @@ public class OParlController {
|
||||
|
||||
@GetMapping("/organization/{id}/memberships")
|
||||
@Operation(summary = "List of all memberships in organization", description = "returns a list of all memberships in requested organization")
|
||||
public List<Membership> membershipsInOrganization(
|
||||
public ObjectList<Membership> membershipsInOrganization(
|
||||
@PathVariable
|
||||
@Parameter(description = "organization ID", example = "0")
|
||||
String id) {
|
||||
@ -129,7 +129,7 @@ public class OParlController {
|
||||
|
||||
@GetMapping("/body/{id}/meetings")
|
||||
@Operation(summary = "List of all meetings in body", description = "returns a list of all meetings in requested body")
|
||||
public List<Meeting> meetingsInBody(
|
||||
public ObjectList<Meeting> meetingsInBody(
|
||||
@PathVariable
|
||||
@Parameter(description = "body ID", example = "0")
|
||||
String id) {
|
||||
@ -139,7 +139,7 @@ public class OParlController {
|
||||
|
||||
@GetMapping("/organization/{id}/meetings")
|
||||
@Operation(summary = "List of all meetings in organization", description = "returns a list of all meetings in requested organization")
|
||||
public List<Meeting> meetingsInOrganization(
|
||||
public ObjectList<Meeting> meetingsInOrganization(
|
||||
@PathVariable
|
||||
@Parameter(description = "organization ID", example = "0")
|
||||
String id) {
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
package de.twomartens.oparlservice.service;
|
||||
|
||||
import de.twomartens.oparlservice.configs.OParlServiceProperties;
|
||||
import de.twomartens.oparlservice.entity.*;
|
||||
import de.twomartens.oparlservice.entity.System;
|
||||
import de.twomartens.oparlservice.entity.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@ -77,8 +76,8 @@ public class OParlService {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Body> getBodies() {
|
||||
return List.of(exampleBody);
|
||||
public ObjectList<Body> getBodies() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Body getBody(String id) {
|
||||
@ -93,36 +92,36 @@ public class OParlService {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Meeting> getMeetingsInBody(String bodyID) {
|
||||
return Collections.emptyList();
|
||||
public ObjectList<Meeting> getMeetingsInBody(String bodyID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Meeting> getMeetingsInOrganization(String organizationID) {
|
||||
return Collections.emptyList();
|
||||
public ObjectList<Meeting> getMeetingsInOrganization(String organizationID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Membership getMembership(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Membership> getMembershipsInBody(String bodyID) {
|
||||
return Collections.emptyList();
|
||||
public ObjectList<Membership> getMembershipsInBody(String bodyID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Membership> getMembershipsInOrganization(String organizationID) {
|
||||
return Collections.emptyList();
|
||||
public ObjectList<Membership> getMembershipsInOrganization(String organizationID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Organization> getOrganizationsInBody(String bodyID) {
|
||||
return Collections.emptyList();
|
||||
public ObjectList<Organization> getOrganizationsInBody(String bodyID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Organization getOrganization(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Person> getPersonsInBody(String bodyID) {
|
||||
return Collections.emptyList();
|
||||
public ObjectList<Person> getPersonsInBody(String bodyID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Person getPerson(String id) {
|
||||
|
||||
Reference in New Issue
Block a user