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

Add support for watching multiple files (or wildcard) with --watch option #33

Open
AbhimanyuG opened this issue Mar 28, 2019 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@AbhimanyuG
Copy link

AbhimanyuG commented Mar 28, 2019

It'll be helpful if specs are distributed across multiple files.

Something like:

apisprout --watch /api-specs/*.yaml
@AbhimanyuG AbhimanyuG changed the title Add support for watching multiple files with --watch option Add support for watching multiple files (or wildcard) with --watch option Mar 28, 2019
@danielgtaylor danielgtaylor added enhancement New feature or request help wanted Extra attention is needed labels Mar 29, 2019
@danielgtaylor
Copy link
Owner

Nice idea! This might also be possible by parsing the refs in the file, which would mean supporting watching files across different directories instead of assuming all the files are in one place.

@AbhimanyuG
Copy link
Author

Nice idea! This might also be possible by parsing the refs in the file, which would mean supporting watching files across different directories instead of assuming all the files are in one place.

Yea, that makes more sense.

For anyone looking for workaround right now, here's a pm2 wrapper Dockerfile and command:

Dockerfile:

FROM danielgtaylor/apisprout
RUN apk update && apk add nodejs npm && npm i -g pm2

docker-compose.yml

 api-mock:
    build: ./dir
    volumes:
      - "./dir:/api-specs"
    entrypoint: "pm2 start apisprout --no-daemon --watch /api-specs/ -- /api-specs/openapi.yaml"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants