swaggo / swag

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

Ignore comment line of struct fields #1712

Open iredmail opened 8 months ago

iredmail commented 8 months ago

Is your feature request related to a problem? Please describe.

No.

Describe the solution you'd like

We write comments in non-English, but software will be used by people speak only English, so we'd like to hide (all) comment lines. Is there a way to not extract comment lines of struct fields? (struct is used as models in doc)

Virviil commented 3 months ago

You've got some workaround

type Foo struct {
  bar bool
  // Comment for a field

  baz string
  // Comment for another field
}