method to extendSpec and api docs