github.com/emreu/go-swagger@v0.22.1/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        --log-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        -c, --include=           include packages matching pattern
    24        -x, --exclude=           exclude packages matching pattern
    25            --include-tag=       include routes having specified tags (can be specified many times)
    26            --exclude-tag=       exclude routes having specified tags (can be specified many times)
    27  ```
    28  
    29  See code annotation rules [here](../use/spec.md)