Added logic for parsing api specs