Support for Open API documentation auto generation in express utils and other frameworks
Expected Behavior
Imagine having an API that handles creating game data and returns the created user information. For example:
@httpPost("/",`` { description: "create a game" }) async createGame(@requestBody() gameData: CreateGameData, @request() req: Request): Promise<Game> { const newGame = await this.gameService.createGame(gameData, deps); newGame.status = GameStatusLabelBuilder.build(newGame, req.language); return newGame; }
In this scenario, API documentation could be auto-generated based on the HTTP method annotations, function arguments, and return types. This would ensure the documentation is always up-to-date and more reliable compared to manual documentation.
Current Behavior
Currently, this feature does not seem to be implemented.
Possible Solution
Implement a mechanism to generate the Swagger YAML file at runtime based on the HTTP method annotations, function arguments, and return types.
Context
Auto-generating API documentation will keep it consistently up-to-date and more accurate, significantly improving over the manual documentation process.