Two teenagers have been given detention orders and a third was sentenced to youth rehabilitation after a knife assault on a 15-year-old.