You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We aim to implement a feature that dynamically generates API documentation using AI when the server mounts. This feature will ensure that all routes, controllers, and serializer methods for each module in the application are documented comprehensively and professionally. The generated documentation will be accessible via a dedicated /api/documentation route.
Requirements
1. Route Data Extraction
On server startup, the system should automatically scan all modules to identify and extract route-related metadata, including:
Controller methods
Serializer methods
Additional details required to generate meaningful API documentation
2. AI-Powered Documentation Generation
Send the extracted route data to an AI model (e.g., OpenAI or any other suitable provider).
Include a descriptive prompt to ensure high-quality, contextually accurate documentation is generated for all provided routes.
There is a chance of having more number of routes in large projects, which might result issues with token size limits. The implementation should generate and inject the document in chunks.
3. Inject Generated Documentation and expose a route
Save the AI-generated documentation as static readme file under the dist folder.
This file should be structured to be easily accessed by the frontend.
Expose an api /api/get-documentation under documentation module, that returns the markdown documentation.
4. Frontend Integration
Serve the generated documentation via the /api/documentation route, enabling seamless access and display in the frontend.
Deliverables
Updated server logic to scan and process route data on startup.
A script or service to communicate with the AI model and handle documentation generation.
Integration logic to inject the documentation into the dist folder.
An accessible /api/documentation route for frontend consumption.
This feature is essential for improving the usability and accessibility of the backend API and will serve as a showcase of automation in the development pipeline.
The text was updated successfully, but these errors were encountered:
There are some issues/missed things that have been found while implemented this in Picket, which includes:
The documentation is incomplete, it haven't generated documentation for all the routes. There are about 78 routes, so this might have happened due to the token size limits. Need update the implementation to generate and inject the document in chunks.
There are some instances where the routes are incorrectly represented like /api/tournaments/(?::id)/games/(?::id)/game-final-outcomes, this is happening if there are "/:id" formatted route in server (base path of module). Just need to replace the regrex properly with :/id.
Description
We aim to implement a feature that dynamically generates API documentation using AI when the server mounts. This feature will ensure that all routes, controllers, and serializer methods for each module in the application are documented comprehensively and professionally. The generated documentation will be accessible via a dedicated
/api/documentation
route.Requirements
1. Route Data Extraction
2. AI-Powered Documentation Generation
3. Inject Generated Documentation and expose a route
dist
folder./api/get-documentation
under documentation module, that returns the markdown documentation.4. Frontend Integration
/api/documentation
route, enabling seamless access and display in the frontend.Deliverables
dist
folder./api/documentation
route for frontend consumption.This feature is essential for improving the usability and accessibility of the backend API and will serve as a showcase of automation in the development pipeline.
The text was updated successfully, but these errors were encountered: