1Panel icon indicating copy to clipboard operation
1Panel copied to clipboard

[Feature] Suggest using OpenAPI Generator to generate API client for frontend

Open ruibaby opened this issue 11 months ago • 1 comments
trafficstars

1Panel Version

dev branch(d2da7e2ea5dd9a6440dd082f819cccf4109daf97)

Please describe your needs or suggestions for improvements

Currently, the frontend API integration relies on manually written request code and type definitions, which can be cumbersome and risks inconsistency with the backend. Proposing to use OpenAPI Generator to auto-generate API client code and types.

Benefits:

  • Ensures perfect type synchronization between frontend and backend
  • Eliminates need for manual API request code and type definitions
  • Provides clean, semantic API calls (e.g. apiClient.appStore.listInstalledApps())
  • Reduces cognitive overhead for frontend developers and improves efficiency

This would streamline development workflow and help maintain API consistency across the stack.

Please describe the solution you suggest

No response

Additional Information

No response

ruibaby avatar Dec 06 '24 08:12 ruibaby

Thanks for your feedback. We will consider integrating OpenAPI Generator in a future version.

wanghe-fit2cloud avatar Dec 06 '24 09:12 wanghe-fit2cloud

There is no follow-up discussion or associated PR, so I will close this issue.

ruibaby avatar May 19 '25 08:05 ruibaby