Preheat the oven to 190°C. Line a baking sheet with parchment paper.
Make the pesto: put all ingredients into a food processor, then whiz until you get a smooth paste. Set aside.
Shred the chicken meat into tiny pieces. Put these into a bowl. Add the sweetcorn or your chosen vegetable (finely chopped). Pour over half of the pesto, season to taste and combine. Set aside.
Unroll the pastry on a flat worksurface.
To make puff parcels: cut the pastry into 6 rectangles. Using a silicon brush, spread some pesto over the sheets leaving a 1 cm border. Brush the borders with the beaten egg. Put a spoonful of filling on each sheet, then fold over and pinch the edges together to seal. Make 3 slits with a knife in the tops for air vents. Brush them with the egg wash and place them onto the line tray.
To make swirls: spread some pesto all over the pastry sheet then spread the chicken filling on top, leaving a border at the edges. ( You can scatter some parmesan cheese on top at this point if you like). Roll up the pastry tightly, like a swiss roll. If you have chill in the fridge for 30 minutes. Brush the surface of the roll all around with the egg wash then cut into 2 cm thick slices. Put these carefully on the lined sheet, cut-side facing up.
Put the tray into the middle of the oven and bake for 15-20 minutes until golden, puffed and cooked through.
Serve warm or at room temperature.