Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing cli watch option described in documentation #331

Open
danielemery opened this issue Sep 30, 2022 · 1 comment
Open

Missing cli watch option described in documentation #331

danielemery opened this issue Sep 30, 2022 · 1 comment
Labels
pinned Issues that will not be automatically closed

Comments

@danielemery
Copy link

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.

@danielemery
Copy link
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)

@daniloab daniloab added the pinned Issues that will not be automatically closed label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Issues that will not be automatically closed
Projects
None yet
Development

No branches or pull requests

2 participants