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

[FEATURE] Separate Api classes for each Controller [Api] #739

Open
xeinebiu opened this issue Mar 19, 2024 · 0 comments
Open

[FEATURE] Separate Api classes for each Controller [Api] #739

xeinebiu opened this issue Mar 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@xeinebiu
Copy link

Take as example the following library
https://www.npmjs.com/package/openapi-typescript-codegen

It is able to generate something like

final authApi = AuthApi.create(...);  // auth as api tag
final postsApi = PostsApi.create(...); // posts as api tag

authApi.signIn(...);  // signIn is the operationId
postsApi.getAll(...); // getAll is the operationId

while, the swagger-dart-code-generator is only able to provide something like

final demoApi = DemoApi.create(...);

demoApi.apiAuthPost(...);
demoApi.apiPostsGetAllPost(...);

We can see some issues like operationId is not respected. each method has some generated prefix and postfix. Swagger tags are not used to generate separate API classes like openapi-typescript-codegen does.

@xeinebiu xeinebiu added the enhancement New feature or request label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants