schedules:
ScheduleA: &id001
commands: - type: event name: Event1 - type: delay period: 1m
# Detail omitted...
nodes:
- address: 127.0.0.1
schedule: *id001emu.yml has an error:
* Failed to parse configuration at: nodes.schedule; Can not instantiate value of type java.lang.String from String value; no single-String constructor/factory method (through reference chain: com.company.EmulatorConfiguration["nodes"]->com.company.NodeConfiguration["schedule"])Is this is an issue with the version of jackson that Dropwizard is using?
Thanks.
Simon
I’m assuming you mean the Java code.
Somewhat simplified, I have:
public class EmulatorConfiguration extends Configuration {
@NotEmpty
@JsonProperty("nodes")
private List<NodeConfiguration> nodes;
@JsonProperty
private Map<String, Schedule> schedules;
}
public class Schedule {
@NotEmpty
@JsonProperty
private List<ScriptCommand> commands;
}
public class NodeConfiguration {
@NotEmpty
private String address;
@JsonProperty
private Schedule schedule;
}