swag
swag copied to clipboard
Exclude comments from generated documentation
Is your feature request related to a problem? Please describe.
Marking comments to exclude from documentation would be very helpful. It's partially working:
While using swag
I observed that if I put comment at the end of the line while having comment in line above - this first comment is visible in generated docs but comment at the end of the line isn't. If I remove first comment - second one became visible.
Describe the solution you'd like
Possibility to exclude comments - for example like in go-doc (//line
).
Describe alternatives you've considered
Other (not conflicting with go-doc's //line
) way of marking comments to exclude.
Additional context
// (1) Always visible comment
Description string `json:"description"` // (2) Comment excluded only if (1) is added.
Name string `json:"name"`
I've discovered this behavior by testing possibilities for having excluded comments. I think something like
//line (1) Comment excluded because '//line' is added (no need to add comment at the end of the line)
Description string `json:"description"`
Name string `json:"name"`
Would be simpler.
same with #243, PR is welcome
same with #243, PR is welcome
Same issue for me
Same issue for me