Preheat your oven to 200°C / 400°F.
Chop all of the vegetables into chunks roughly the same size as the gnocchi.
In a large roasting dish or sheet pan, toss the gnocchi, cherry tomatoes, zucchini, peppers, onion, and capers together. Add a few good glugs of olive oil, and shake the pan to distribute evenly.
Cover the pan with foil, place into the oven and roast for about 30 minutes, until the vegetables are just beginning to brown.
Remove the tray from the oven, remove the foil, and give it a stir. Add the ricotta, dropping spoonfuls over the top of the vegetables.
Put the tray back into the oven (without foil) and roast for another 20 minutes, until the vegetables are saucy and the ricotta is golden brown.
Remove from the oven, sprinkle with fresh herbs if desired, and serve immediately.