project-anuvaad / anuvaad

Anuvaad - Open Sourced Document Translation Platform for Indic Languages

Home Page:https://anuvaad.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automate Swagger Docs for Flask Modules

aswinpradeep opened this issue · comments

Automate Swagger Docs for Flask Modules


Description
Currently, we maintain separate OpenAPI YAML files for each Flask microservice, which require manual updates whenever there are API changes. An example of this can be found here. The goal is to automate this process, similar to how FastAPI handles it, so that Swagger documentation gets updated automatically when the code changes.

Suggested Starting Point
A potential starting point for this automation is the Flask OpenAPI3 library. However, other solutions can be explored as well.

Milestones

  1. Approach to the Solution & Highlight the Affected Sections
    • Identify the best approach to automate Swagger documentation.
    • Highlight which sections of the codebase will be affected by this change.
  2. Suggest the Best Approach
    • Evaluate different libraries and methods.
    • Propose the most efficient and reliable solution.
  3. Local Testing for a Single Module
    • Implement the chosen solution for one Flask module.
    • Ensure that the Swagger documentation updates automatically with code changes.
  4. Raise a PR
    • Submit a pull request with the implemented changes and testing results.
  5. PR Gets Approved
    • Work with the team to review and approve the pull request.

Additional Context

  • The current process of maintaining separate OpenAPI YAML files is time-consuming and error-prone.
  • Automating this process will ensure that our API documentation is always up-to-date and accurate, improving the development workflow and reducing the potential for inconsistencies.