github.com/kaisawind/go-swagger@v0.19.0/docs/generate/spec.md (about)

     1  # Generate a spec from source code
     2  
     3  ```
     4  Usage:
     5    swagger [OPTIONS] generate spec [spec-OPTIONS]
     6  
     7  generate a swagger spec document from a go application
     8  
     9  Application Options:
    10    -q, --quiet               silence logs
    11    -o, --output=LOG-FILE     redirect logs to file
    12  
    13  Help Options:
    14    -h, --help                Show this help message
    15  
    16  [spec command options]
    17        -b, --base-path=      the base path to use (default: .)
    18        -t, --tags=           build tags
    19        -m, --scan-models     includes models that were annotated with 'swagger:model'
    20            --compact         when present, doesn't prettify the json
    21        -o, --output=         the file to write to
    22        -i, --input=          the file to use as input
    23  ```
    24  
    25  See code annotation rules [here](../use/spec.md)