Preheat the oven to 190°C.
Peel and cut the squash into bite-sized chunks.
Cut the onion into 8 wedges. Slightly flatten the garlic cloves with a meat tenderiser (no need to peel them).
Put the chicken legs into a large roasting tray. Scatter the onion, squash, rosemary leaves and garlic around the chicken pieces. Cut the chilli in half and add it to the tray (if used). Season with salt and pepper then brush with oil.
Put the tray in the oven and cook for 35 minutes, until the chicken is lightly browned.
Turn the chicken, onion and squash pieces around with a thong.
Slice the tomatoes into 1 cm thick rings and put these on top the chicken and vegetable pieces.
Mix the balsamic vinegar with the maple syrup. Brush the chicken, tomato and squash pieces with the glaze.
Bake for 15-20 minutes until the chicken and vegetables are golden.
Serve hot with the juices.