swaggo / swag

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

Fixes Issue 1829 #1830

Closed Kafkalasch closed 4 weeks ago

Kafkalasch commented 1 month ago

Describe the PR Fixes the issue described in https://github.com/swaggo/swag/issues/1829

Relation issue https://github.com/swaggo/swag/issues/1829

Additional context The previous logic could select the wrong markdown file if one tag was a substring of another. E.g. "objects" and "my-special-objects".

sdghchj commented 1 month ago

Hi, you have to fix the failed tests,TestParseDescriptionMarkdown and there may be others.

Kafkalasch commented 4 weeks ago

@sdghchj , have fixed the tests. They have actually caught an issue that would have been introduced. Now I also understand why the code was written like that in the first place. It needs to understand "api" and "api.md". Fixed it, to be able to deal with both inputs.

Your review has been dismissed I think, could you re-review or re-approve?