fix(gen:endpoint): fix endpoint spec not adjusting from route url

fixes #298