updated the regex to support passing in an api version and the added back the type parameter for client formatting