Skip to content

Missing cli watch option described in documentation #331

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.

Activity

  1. danielemery commented on Sep 30, 2022

    @danielemery
    Author

    Suggestions

    1. Simply remove documentation to not confuse the next person looking for a watch option
    2. Replace the watch details with a simple explanation of how to use nodemon or bash etc to achieve the same result
    3. Re-implement the watch flag and functionality

    If the answer is (1) or (2) I am happy to raise a PR, we will probably end up implementing a watch outside of the cli for our use in the short term anyway.

    If the answer is (3) I probably don't have the time or the context to help out (I would suggest if it can be achieved with (2) it might be the easier to maintain solution anyway)

  2. added
    pinnedIssues that will not be automatically closed
    on Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pinnedIssues that will not be automatically closed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions