github.com/josephspurrier/go-swagger@v0.2.1-0.20221129144919-1f672a142a00/docs/use/spec/ignore.md (about)

     1  # swagger:ignore
     2  
     3  ## Syntax:
     4  
     5  ```
     6  swagger:ignore
     7  ```
     8  
     9  ### Example 1: Marks a struct as explicitly ignore from the Swagger spec output
    10  
    11  ```
    12  //swagger: ignore
    13  type Patient struct {
    14      // example: John Doe
    15      name        string  `json:"name"`
    16      // example: 27
    17      age         int     `json:"age""`
    18      // example: New York
    19      city        string  `json:"city"`
    20      // example: 1234567890
    21      phone       string  `json:"phone"`
    22      // example: 1A2B3C
    23      uniqueId    string  `json:"unique_id"`
    24  }
    25  ```
    26  
    27  ### Example 2: Exclude a specific field from swagger spec output
    28  
    29  ```
    30  //swagger: model Person
    31  type Person struct {
    32      // example: John Doe
    33      name        string  `json:"name"`
    34      // example: 27
    35      age         int     `json:"age""`
    36      // example: New York
    37      city        string  `json:"city"`
    38      // example: 1234567890
    39      phone       string  `json:"phone"`
    40      // example: 1A2B3C
    41      // swagger: ignore
    42      uniqueId    string  `json:"unique_id"`
    43  }
    44  ```