External API documents duration as numeric but requires string for scheduling

Steps to reproduce

https://docs.opencast.org/r/6.x/developer/api/events-api/#post-apievents

includes duration field of type Integer, but it's parsed as a string, and passing a numeric type results in an error.

2019-05-20T09:19:59,447 | ERROR | (EventsEndpoint:534) - Unable to create event
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
at org.opencastproject.external.util.SchedulingUtils$SchedulingInfo.of(SchedulingUtils.java:259) ~[101:opencast-external-api:7.0.0.SNAPSHOT]
at org.opencastproject.external.endpoint.EventsEndpoint.scheduleNewEvent(EventsEndpoint.java:543) ~[101:opencast-external-api:7.0.0.SNAPSHOT]
at org.opencastproject.external.endpoint.EventsEndpoint.createNewEvent(EventsEndpoint.java:513) [101:opencast-external-api:7.0.0.SNAPSHOT]

Status

Assignee

Stephen Marquard

Reporter

Stephen Marquard

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Major
Configure