improve rest api docs generation script