Fix mediator generation + spec references