Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function name generation may be misleading/incorrect #821

Open
lionel87 opened this issue Jul 9, 2024 · 1 comment
Open

Function name generation may be misleading/incorrect #821

lionel87 opened this issue Jul 9, 2024 · 1 comment

Comments

@lionel87
Copy link

lionel87 commented Jul 9, 2024

I had issues with the function name generation, a path like /user/logout generated as api.user.logoutList() but it is not actually a list.
A different path like /clients/{zone} is generated as api.clientsDetail() which is actually a list.

It would be a good feature to give control over the naming, or use the naming scheme that the swagger.io generator uses. it suffixes the name with the http method, like api.user.logoutGET() and api.clientsGET().

The current behavior that checks if the path contains placeholders are working only on simple or example apis I quess.

_.camelCase(`${pathName}_${hasPathInserts ? "detail" : "list"}`),

swagger-typescript-api version: 13.0.12

@snuup
Copy link

snuup commented Aug 13, 2024

This is very serious. WIthout any reason my api method "getBunny" is renamed into "getBunnyList". Makes no sense at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants