updated swagger to allow sub path and wrote tests