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

๐Ÿ› ๏ธ [TASK] : Setup code generation #347

Closed
6 tasks
Tracked by #69
minikin opened this issue Mar 27, 2024 · 0 comments ยท Fixed by #357
Closed
6 tasks
Tracked by #69

๐Ÿ› ๏ธ [TASK] : Setup code generation #347

minikin opened this issue Mar 27, 2024 · 0 comments ยท Fixed by #357
Assignees

Comments

@minikin
Copy link
Collaborator

minikin commented Mar 27, 2024

Summary

Setup swagger_dart_code_generator for Automated Code Generation from OpenAPI Specifications.

Description

This task will automate code generation within the catalyst_voices_services project, leveraging the swagger_dart_code_generator. This will streamline the development process and ensure that our Flutter application remains in sync with the backend service's API.

Tasks

  • Setup swagger_dart_code_generator:
    Integrate swagger_dart_code_generator into our project and ensure that it's properly configured to work with our current development environment.

  • Automate OpenAPI Specification Fetching:
    Implement a mechanism (potentially using Earthly or a custom script) that automatically fetches the latest version of the OpenAPI specification from our backend service. This should ensure our generated code always matches the backend's current API.

  • Generate Code:
    Configure the code generator to run, fetching the latest OpenAPI spec and generating the Dart code accordingly. Focus on ensuring the generated code includes all necessary models, clients, and serialization logic per our API's latest specs.

  • Organize Generated Code:
    Ensure all generated code is placed within our project structure's dedicated generated folder. This organization will help maintain clarity between handwritten and auto-generated code.

  • Integrate with Version Control: Automate the inclusion of generated code in our version control system. This ensures that our generated code is always up-to-date with the latest API specifications and is versioned alongside our manual code changes.

  • Add Code Generation to Earthfile:
    Incorporate the code generation step into our Earthfile to automate this process within our CI/CD pipeline. This integration should include fetching the latest API specs and generating code as part of our build process.

Acceptance Criteria

  • swagger_dart_code_generator is fully integrated and configured within the catalyst_voices_services project.
  • There's an automated process for fetching the latest OpenAPI specifications and generating Dart code accordingly.
  • The generated code is saved in the generated folder and committed to git.
  • The Earthfile includes a step for code generation, ensuring this process is integrated into our CI/CD pipeline.

Additional Notes

  • Review and test the integration thoroughly to ensure the generated code meets our project's standards and requirements.
@minikin minikin changed the title ๐Ÿ› ๏ธ [TASK] : Setup swagger_dart_code_generator and code generation ๐Ÿ› ๏ธ [TASK] : Setup code generation Mar 27, 2024
@minikin minikin moved this to ๐Ÿ“‹ Backlog in Catalyst Mar 27, 2024
@coire1 coire1 moved this from ๐Ÿ“‹ Backlog to ๐Ÿ— In progress in Catalyst Mar 27, 2024
@github-project-automation github-project-automation bot moved this from ๐Ÿ— In progress to โœ… Done in Catalyst Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants