swaggo / swag

Automatically generate RESTful API documentation with Swagger 2.0 for Go.
MIT License
10.24k stars 1.17k forks source link

Added suport for parsing comments inside of function bodies #1824

Closed j-d-ha closed 1 month ago

j-d-ha commented 1 month ago

Describe the PR I have updated ParseRouterAPIInfo() to parse API info from comments inside of function bodies if the new CLI flag ParseFuncBody is used.

Relation issue Implements idea detailed here: https://github.com/swaggo/swag/issues/1809

Additional context This change is opt-in only as the new CLI flag ParseFuncBody must be used to get the new functionality. This will have no impact on existing users.