if (rests == null || rests.isEmpty()) {
System.out.print("There are no REST services in CamelContext with name: " + context);
return null;
}
// use a routes definition to dump the rests
RestsDefinition def = new RestsDefinition();
def.setRests(rests);
System.out.println(ModelHelper.dumpModelAsXml(def));
return null;
}