Preheat the oven to gas 6 1/2, 210°C, fan 190°C. Put the onions in a roasting tin and spoon over the oil. Season. Roast for 20 minutes, adding the garlic for the final 5 minutes. Set aside until needed.
On a lightly floured surface, roll out the pastry to fit a 28cm (9 1/2in) tarte tatin tin. Transfer to a plate lined with nonstick paper and chill until needed.
In a pan, mix the sugar with 30ml (1fl oz) water and stir over a low heat until the sugar dissolves. Bring to a boil and cook, without stirring, until caramelised. Remove from the heat and whisk in the vinegar and thyme, then carefully pour the syrup into the tin.
Arrange the onions in the tin, packing them in tightly. Dot the olives around the onions and scatter over the Parmesan. Lay the pastry over the onions, tucking the edges neatly inside the pan.
Bake for 25-30 minutes. Remove from the oven and allow to sit for 5 minutes. To turn it out, put a plate over the tin and, using two oven mitts, invert the tart onto the plate. Garnish with a few sprigs of thyme.
See more Onion recipes
We recommend pairing this sweet red onion tarte tatin with finest* Gavi white wine. This medium-bodied wine is refreshing, bright and carries citrussy notes of orange blossom - perfect for a light, spring meal.