public class ScheduleEndpoint {
@Inject
private ScheduleRepository scheduleRepository;
@Context
private UriInfo uriInfo;
<BUG>@POST
public Response add(Schedule schedule) {</BUG>
Schedule created = scheduleRepository.create(schedule);
return Response.created(getURIForSelf(schedule)).entity(created).build();
}

public class ScheduleEndpoint {
@Inject
private ScheduleRepository scheduleRepository;
@Context
private UriInfo uriInfo;
@POST
@ApiOperation(value = "Adds a new schedule to the conference")
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input")}
)
public Response add(Schedule schedule) {
Schedule created = scheduleRepository.create(schedule);
return Response.created(getURIForSelf(schedule)).entity(created).build();
}
