fix(gen): camelCase endpoint name when used in variable name

Fixes #542

Closes #540