Updated the generation of spec