Skip to content

Missing cli watch option described in documentation #331

@danielemery

Description

@danielemery

Describe the bug
The documentation describes a watch option when using the cli but it doesn't exist.

To Reproduce
Steps to reproduce the behavior:

  1. Read the documentatiion at https://www.npmjs.com/package/swagger-jsdoc/v/1.9.1 (see the last point of Using a CLI)
  2. Attempt to run the command as described, see an example from my project:
    swagger-jsdoc -d ./src/rest/internal/swagger-definition.js './src/rest/internal/**/*.ts' -o ./src/rest/internal/swagger.json -w
  3. See error
    error: unknown option '-w'
    
  4. Run help and note option is not described
    user@shell: npx swagger-jsdoc --help
    
    Usage: swagger-jsdoc [options] <path ...>
    
    Options:
      -V, --version                            output the version number
      -d, --definition <swaggerDefinition.js>  Input swagger definition.
      -o, --output [swaggerSpec.json]          Output swagger specification.
      -h, --help                               display help for command
    

Expected behavior
A watch process starts and monitors files specified in glob for changes, regenerating the swagger specification as required.

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
I had a look through the history and found that it used to exist but was removed in #121 without comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pinnedIssues that will not be automatically closed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions